All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for hard readonly mount
@ 2011-05-26  9:40 Tiger Yang
  2011-05-26  9:56 ` [Ocfs2-devel] [PATCH 1/4] ocfs2: No need to hangup cluster on " Tiger Yang
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Tiger Yang @ 2011-05-26  9:40 UTC (permalink / raw)
  To: ocfs2-devel

Hi, All,

These four patches are all related to ocfs2 on hard readonly mount.
patch 1 fix oops when umount ocfs2 on hard readonly device.
Because ocfs2_dismount_volume() will call ocfs2_cluster_hangup() and 
then call ocfs2_stack_driver_put(), will hit BUG_ON(active_stack == NULL).

patch 2 fix oops when do ls or cat in ocfs2 on hard readonly device.
Because ocfs2_open_lock() will call ocfs2_cluster_lock() and then call 
ocfs2_dlm_lock(), but active_stack is NULL.

patch 3 fix bug of http://oss.oracle.com/bugzilla/show_bug.cgi?id=1322
ocfs2_statfs, ocfs2_fiemap, ocfs2_get_acl, ocfs2_listxattr and 
ocfs2_xattr_get need ocfs2_inode_lock to get dinode buffer head, but on 
hard readonly mount, they did not get they expected, so lead to oops. 
ocfs2_init_security_and_acl and ocfs2_test_inode_bit also called 
ocfs2_inode_lock(inode, &bh, 0), but they are safe, because  
ocfs2_reflink and ocfs2_get_dentry  check hard read only before them.

patch 4 fix problem of running ls on hard readonly mount  can't get the 
right result.
Because ocfs2_dentry_lock() return -EROFS. It should return 0.

best regards,
Tiger

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Ocfs2-devel] [PATCH 1/4] ocfs2: No need to hangup cluster on hard readonly mount
  2011-05-26  9:40 [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for hard readonly mount Tiger Yang
@ 2011-05-26  9:56 ` Tiger Yang
  2011-05-26  9:57 ` [Ocfs2-devel] [PATCH 2/4] ocfs2: Add hard readonly check in open lock Tiger Yang
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Tiger Yang @ 2011-05-26  9:56 UTC (permalink / raw)
  To: ocfs2-devel

As no cluster service in hard readonly mount, so skip hangup
cluster, otherwise ocfs2_stack_driver_put will hit BUG_ON.

Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
---
 fs/ocfs2/super.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 5a521c7..395b26f 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -1973,7 +1973,8 @@ static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err)
 	 * If we failed before we got a uuid_str yet, we can't stop
 	 * heartbeat.  Otherwise, do it.
 	 */
-	if (!mnt_err && !ocfs2_mount_local(osb) && osb->uuid_str)
+	if (!mnt_err && !ocfs2_mount_local(osb) && osb->uuid_str &&
+	    !ocfs2_is_hard_readonly(osb))
 		hangup_needed = 1;
 
 	if (osb->cconn)
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Ocfs2-devel] [PATCH 2/4] ocfs2: Add hard readonly check in open lock
  2011-05-26  9:40 [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for hard readonly mount Tiger Yang
  2011-05-26  9:56 ` [Ocfs2-devel] [PATCH 1/4] ocfs2: No need to hangup cluster on " Tiger Yang
@ 2011-05-26  9:57 ` Tiger Yang
  2011-05-26  9:57 ` [Ocfs2-devel] [PATCH 3/4] ocfs2: Get dinode buffer head on hard readonly mount Tiger Yang
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Tiger Yang @ 2011-05-26  9:57 UTC (permalink / raw)
  To: ocfs2-devel

As no dlm lock in hard readonly mount, so add hard readonly check
in open lock, otherwise ocfs2_cluster_lock leads to oops.

Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
---
 fs/ocfs2/dlmglue.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index 7642d7c..09e8b30 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -1692,7 +1692,7 @@ int ocfs2_open_lock(struct inode *inode)
 	mlog(0, "inode %llu take PRMODE open lock\n",
 	     (unsigned long long)OCFS2_I(inode)->ip_blkno);
 
-	if (ocfs2_mount_local(osb))
+	if (ocfs2_is_hard_readonly(osb) || ocfs2_mount_local(osb))
 		goto out;
 
 	lockres = &OCFS2_I(inode)->ip_open_lockres;
@@ -1718,6 +1718,12 @@ int ocfs2_try_open_lock(struct inode *inode, int write)
 	     (unsigned long long)OCFS2_I(inode)->ip_blkno,
 	     write ? "EXMODE" : "PRMODE");
 
+	if (ocfs2_is_hard_readonly(osb)) {
+		if (write)
+			status = -EROFS;
+		goto out;
+	}
+
 	if (ocfs2_mount_local(osb))
 		goto out;
 
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Ocfs2-devel] [PATCH 3/4] ocfs2: Get dinode buffer head on hard readonly mount
  2011-05-26  9:40 [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for hard readonly mount Tiger Yang
  2011-05-26  9:56 ` [Ocfs2-devel] [PATCH 1/4] ocfs2: No need to hangup cluster on " Tiger Yang
  2011-05-26  9:57 ` [Ocfs2-devel] [PATCH 2/4] ocfs2: Add hard readonly check in open lock Tiger Yang
@ 2011-05-26  9:57 ` Tiger Yang
  2011-05-26  9:58 ` [Ocfs2-devel] [PATCH 4/4] ocfs2: Get readonly dentry lock " Tiger Yang
  2011-05-26 16:03 ` [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for " Sunil Mushran
  4 siblings, 0 replies; 14+ messages in thread
From: Tiger Yang @ 2011-05-26  9:57 UTC (permalink / raw)
  To: ocfs2-devel

ocfs2_statfs, ocfs2_fiemap, ocfs2_get_acl, ocfs2_listxattr and
ocfs2_xattr_get need ocfs2_inode_lock to get dinode buffer head
even on hard readonly mount.

Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
---
 fs/ocfs2/dlmglue.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index 09e8b30..717f8d3 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -2304,7 +2304,7 @@ int ocfs2_inode_lock_full_nested(struct inode *inode,
 	if (ocfs2_is_hard_readonly(osb)) {
 		if (ex)
 			status = -EROFS;
-		goto bail;
+		goto getbh;
 	}
 
 	if (ocfs2_mount_local(osb))
@@ -2362,7 +2362,7 @@ local:
 			mlog_errno(status);
 		goto bail;
 	}
-
+getbh:
 	if (ret_bh) {
 		status = ocfs2_assign_bh(inode, ret_bh, local_bh);
 		if (status < 0) {
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Ocfs2-devel] [PATCH 4/4] ocfs2: Get readonly dentry lock on hard readonly mount
  2011-05-26  9:40 [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for hard readonly mount Tiger Yang
                   ` (2 preceding siblings ...)
  2011-05-26  9:57 ` [Ocfs2-devel] [PATCH 3/4] ocfs2: Get dinode buffer head on hard readonly mount Tiger Yang
@ 2011-05-26  9:58 ` Tiger Yang
  2011-05-26 16:03 ` [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for " Sunil Mushran
  4 siblings, 0 replies; 14+ messages in thread
From: Tiger Yang @ 2011-05-26  9:58 UTC (permalink / raw)
  To: ocfs2-devel

As some readonly operations such as ls, cat are allowed to
run on hard readonly mount, so change return value to 0 to
allow them to get fake readonly dentry lock.

Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
---
 fs/ocfs2/dlmglue.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index 717f8d3..da103f5 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -2634,8 +2634,11 @@ int ocfs2_dentry_lock(struct dentry *dentry, int ex)
 
 	BUG_ON(!dl);
 
-	if (ocfs2_is_hard_readonly(osb))
-		return -EROFS;
+	if (ocfs2_is_hard_readonly(osb)) {
+		if (ex)
+			return -EROFS;
+		return 0;
+	}
 
 	if (ocfs2_mount_local(osb))
 		return 0;
@@ -2653,7 +2656,7 @@ void ocfs2_dentry_unlock(struct dentry *dentry, int ex)
 	struct ocfs2_dentry_lock *dl = dentry->d_fsdata;
 	struct ocfs2_super *osb = OCFS2_SB(dentry->d_sb);
 
-	if (!ocfs2_mount_local(osb))
+	if (!ocfs2_is_hard_readonly(osb) && !ocfs2_mount_local(osb))
 		ocfs2_cluster_unlock(osb, &dl->dl_lockres, level);
 }
 
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for hard readonly mount
  2011-05-26  9:40 [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for hard readonly mount Tiger Yang
                   ` (3 preceding siblings ...)
  2011-05-26  9:58 ` [Ocfs2-devel] [PATCH 4/4] ocfs2: Get readonly dentry lock " Tiger Yang
@ 2011-05-26 16:03 ` Sunil Mushran
  2011-05-26 16:16   ` Tristan Ye
  2011-05-26 16:21   ` Tristan Ye
  4 siblings, 2 replies; 14+ messages in thread
From: Sunil Mushran @ 2011-05-26 16:03 UTC (permalink / raw)
  To: ocfs2-devel

On 05/26/2011 02:40 AM, Tiger Yang wrote:
> These four patches are all related to ocfs2 on hard readonly mount.
> patch 1 fix oops when umount ocfs2 on hard readonly device.
> Because ocfs2_dismount_volume() will call ocfs2_cluster_hangup() and 
> then call ocfs2_stack_driver_put(), will hit BUG_ON(active_stack == 
> NULL).
>
> patch 2 fix oops when do ls or cat in ocfs2 on hard readonly device.
> Because ocfs2_open_lock() will call ocfs2_cluster_lock() and then call 
> ocfs2_dlm_lock(), but active_stack is NULL.
>
> patch 3 fix bug of http://oss.oracle.com/bugzilla/show_bug.cgi?id=1322
> ocfs2_statfs, ocfs2_fiemap, ocfs2_get_acl, ocfs2_listxattr and 
> ocfs2_xattr_get need ocfs2_inode_lock to get dinode buffer head, but 
> on hard readonly mount, they did not get they expected, so lead to 
> oops. ocfs2_init_security_and_acl and ocfs2_test_inode_bit also called 
> ocfs2_inode_lock(inode, &bh, 0), but they are safe, because  
> ocfs2_reflink and ocfs2_get_dentry  check hard read only before them.
>
> patch 4 fix problem of running ls on hard readonly mount  can't get 
> the right result.
> Because ocfs2_dentry_lock() return -EROFS. It should return 0.

Tiger, Thanks. Was this tested with all fs-features enabled? I am
worried about quotas. If not, please test that.

Tristan, Please can you cross check these patches. Enable all features
in a volume, make it readonly and do mount, ls -lR, umount, read, stat,
stat -f. This calls for a test script. We should be able to use loopback.
losetup -rf.

Thanks
Sunil

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for hard readonly mount
  2011-05-26 16:03 ` [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for " Sunil Mushran
@ 2011-05-26 16:16   ` Tristan Ye
  2011-05-26 16:21     ` Sunil Mushran
  2011-05-26 16:21   ` Tristan Ye
  1 sibling, 1 reply; 14+ messages in thread
From: Tristan Ye @ 2011-05-26 16:16 UTC (permalink / raw)
  To: ocfs2-devel

On 05/27/2011 12:03 AM, Sunil Mushran wrote:
> On 05/26/2011 02:40 AM, Tiger Yang wrote:
>> These four patches are all related to ocfs2 on hard readonly mount.
>> patch 1 fix oops when umount ocfs2 on hard readonly device.
>> Because ocfs2_dismount_volume() will call ocfs2_cluster_hangup() and
>> then call ocfs2_stack_driver_put(), will hit BUG_ON(active_stack ==
>> NULL).
>>
>> patch 2 fix oops when do ls or cat in ocfs2 on hard readonly device.
>> Because ocfs2_open_lock() will call ocfs2_cluster_lock() and then call
>> ocfs2_dlm_lock(), but active_stack is NULL.
>>
>> patch 3 fix bug of http://oss.oracle.com/bugzilla/show_bug.cgi?id=1322
>> ocfs2_statfs, ocfs2_fiemap, ocfs2_get_acl, ocfs2_listxattr and
>> ocfs2_xattr_get need ocfs2_inode_lock to get dinode buffer head, but
>> on hard readonly mount, they did not get they expected, so lead to
>> oops. ocfs2_init_security_and_acl and ocfs2_test_inode_bit also called
>> ocfs2_inode_lock(inode, &bh, 0), but they are safe, because 
>> ocfs2_reflink and ocfs2_get_dentry  check hard read only before them.
>>
>> patch 4 fix problem of running ls on hard readonly mount  can't get
>> the right result.
>> Because ocfs2_dentry_lock() return -EROFS. It should return 0.
> 
> Tiger, Thanks. Was this tested with all fs-features enabled? I am
> worried about quotas. If not, please test that.
> 
> Tristan, Please can you cross check these patches. Enable all features
> in a volume, make it readonly and do mount, ls -lR, umount, read, stat,
> stat -f. This calls for a test script. We should be able to use loopback.
> losetup -rf.


Sure,

I'm going to write a dedicated script for sanity check, including these
generic fs syscalls.

Tristan


> 
> Thanks
> Sunil

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for hard readonly mount
  2011-05-26 16:03 ` [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for " Sunil Mushran
  2011-05-26 16:16   ` Tristan Ye
@ 2011-05-26 16:21   ` Tristan Ye
  1 sibling, 0 replies; 14+ messages in thread
From: Tristan Ye @ 2011-05-26 16:21 UTC (permalink / raw)
  To: ocfs2-devel

On 05/27/2011 12:03 AM, Sunil Mushran wrote:
> On 05/26/2011 02:40 AM, Tiger Yang wrote:
>> These four patches are all related to ocfs2 on hard readonly mount.
>> patch 1 fix oops when umount ocfs2 on hard readonly device.
>> Because ocfs2_dismount_volume() will call ocfs2_cluster_hangup() and
>> then call ocfs2_stack_driver_put(), will hit BUG_ON(active_stack ==
>> NULL).
>>
>> patch 2 fix oops when do ls or cat in ocfs2 on hard readonly device.
>> Because ocfs2_open_lock() will call ocfs2_cluster_lock() and then call
>> ocfs2_dlm_lock(), but active_stack is NULL.
>>
>> patch 3 fix bug of http://oss.oracle.com/bugzilla/show_bug.cgi?id=1322
>> ocfs2_statfs, ocfs2_fiemap, ocfs2_get_acl, ocfs2_listxattr and
>> ocfs2_xattr_get need ocfs2_inode_lock to get dinode buffer head, but
>> on hard readonly mount, they did not get they expected, so lead to
>> oops. ocfs2_init_security_and_acl and ocfs2_test_inode_bit also called
>> ocfs2_inode_lock(inode, &bh, 0), but they are safe, because 
>> ocfs2_reflink and ocfs2_get_dentry  check hard read only before them.
>>
>> patch 4 fix problem of running ls on hard readonly mount  can't get
>> the right result.
>> Because ocfs2_dentry_lock() return -EROFS. It should return 0.
> 
> Tiger, Thanks. Was this tested with all fs-features enabled? I am
> worried about quotas. If not, please test that.
> 
> Tristan, Please can you cross check these patches. Enable all features
> in a volume, make it readonly and do mount, ls -lR, umount, read, stat,
> stat -f. This calls for a test script. We should be able to use loopback.
> losetup -rf.

Sure,

I'm going to write a dedicated script for sanity check, including these
generic fs syscalls.

Tristan


> 
> Thanks
> Sunil

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for hard readonly mount
  2011-05-26 16:16   ` Tristan Ye
@ 2011-05-26 16:21     ` Sunil Mushran
  2011-06-02  3:09       ` Tristan Ye
  0 siblings, 1 reply; 14+ messages in thread
From: Sunil Mushran @ 2011-05-26 16:21 UTC (permalink / raw)
  To: ocfs2-devel

On 05/26/2011 09:16 AM, Tristan Ye wrote:
> On 05/27/2011 12:03 AM, Sunil Mushran wrote:
>> Tiger, Thanks. Was this tested with all fs-features enabled? I am
>> worried about quotas. If not, please test that.
>>
>> Tristan, Please can you cross check these patches. Enable all features
>> in a volume, make it readonly and do mount, ls -lR, umount, read, stat,
>> stat -f. This calls for a test script. We should be able to use loopback.
>> losetup -rf.
>
> Sure,
>
> I'm going to write a dedicated script for sanity check, including these
> generic fs syscalls.

Thanks Tristan.

Tiger, I would suggest you roll up the patch into one. I see no reason
for the breakup considering it fixes just one bug and is small enough.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for hard readonly mount
  2011-05-26 16:21     ` Sunil Mushran
@ 2011-06-02  3:09       ` Tristan Ye
  2011-06-02 18:43         ` Sunil Mushran
  0 siblings, 1 reply; 14+ messages in thread
From: Tristan Ye @ 2011-06-02  3:09 UTC (permalink / raw)
  To: ocfs2-devel

Sunil Mushran wrote:
> On 05/26/2011 09:16 AM, Tristan Ye wrote:
>> On 05/27/2011 12:03 AM, Sunil Mushran wrote:
>>> Tiger, Thanks. Was this tested with all fs-features enabled? I am
>>> worried about quotas. If not, please test that.
>>>
>>> Tristan, Please can you cross check these patches. Enable all features
>>> in a volume, make it readonly and do mount, ls -lR, umount, read, stat,
>>> stat -f. This calls for a test script. We should be able to use
>>> loopback.
>>> losetup -rf.
>>
>> Sure,
>>
>> I'm going to write a dedicated script for sanity check, including these
>> generic fs syscalls.
> 
> Thanks Tristan.
> 
> Tiger, I would suggest you roll up the patch into one. I see no reason
> for the breakup considering it fixes just one bug and is small enough.


After running tests on block/loopback device, it shows that:

1. 'ls -lR /kernel/tree' dumps slightly different output:

6c6
< total 436
---
> total 428
37c37
< total 52
---
> total 44
394c394
< total 252
---
> total 228
1408c1408
< total 8
---
> total 4
1636c1636
< total 8

while the data is consistent anyway.


2. 'stat -f' also dumps a slightly different map:

4,5c4,5
< Blocks: Total: 176120528  Free: 170080504  Available: 170080504
< Inodes: Total: 22015066   Free: 21260063
---
> Blocks: Total: 176120528  Free: 170088304  Available: 170088304
> Inodes: Total: 22015066   Free: 21261038


3. Enabling quota on readonly fs caused kernel oops

4. Otherwise, everything is fine(xattr,reflink,..etc)


Testing script attached.


Tristan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: verify_readonly.sh
Type: application/x-sh
Size: 15228 bytes
Desc: not available
Url : http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20110602/b891e97d/attachment-0001.sh 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for hard readonly mount
  2011-06-02  3:09       ` Tristan Ye
@ 2011-06-02 18:43         ` Sunil Mushran
  2011-06-03  1:00           ` Tristan Ye
  0 siblings, 1 reply; 14+ messages in thread
From: Sunil Mushran @ 2011-06-02 18:43 UTC (permalink / raw)
  To: ocfs2-devel

Tristan,

Please can you build a newer ocfs2-test rpm. The last one was built on 2009.

The stat -f discrepancy is probably due to localalloc. We shouldn't be reserving
space for hard-ro mounts. So should be ok as long as the discrepancy can be
accounted for.

# grep "LocalAlloc " /sys/kernel/debug/ocfs2/*/fs_state
The last column * clustersize is the space reserved.

I have no clue what the "total" value comprises off. Can you look into that?

Sunil

On 06/01/2011 08:09 PM, Tristan Ye wrote:
> Sunil Mushran wrote:
>> On 05/26/2011 09:16 AM, Tristan Ye wrote:
>>> On 05/27/2011 12:03 AM, Sunil Mushran wrote:
>>>> Tiger, Thanks. Was this tested with all fs-features enabled? I am
>>>> worried about quotas. If not, please test that.
>>>>
>>>> Tristan, Please can you cross check these patches. Enable all features
>>>> in a volume, make it readonly and do mount, ls -lR, umount, read, stat,
>>>> stat -f. This calls for a test script. We should be able to use
>>>> loopback.
>>>> losetup -rf.
>>> Sure,
>>>
>>> I'm going to write a dedicated script for sanity check, including these
>>> generic fs syscalls.
>> Thanks Tristan.
>>
>> Tiger, I would suggest you roll up the patch into one. I see no reason
>> for the breakup considering it fixes just one bug and is small enough.
>
> After running tests on block/loopback device, it shows that:
>
> 1. 'ls -lR /kernel/tree' dumps slightly different output:
>
> 6c6
> <  total 436
> ---
>> total 428
> 37c37
> <  total 52
> ---
>> total 44
> 394c394
> <  total 252
> ---
>> total 228
> 1408c1408
> <  total 8
> ---
>> total 4
> 1636c1636
> <  total 8
>
> while the data is consistent anyway.
>
>
> 2. 'stat -f' also dumps a slightly different map:
>
> 4,5c4,5
> <  Blocks: Total: 176120528  Free: 170080504  Available: 170080504
> <  Inodes: Total: 22015066   Free: 21260063
> ---
>> Blocks: Total: 176120528  Free: 170088304  Available: 170088304
>> Inodes: Total: 22015066   Free: 21261038
>
> 3. Enabling quota on readonly fs caused kernel oops
>
> 4. Otherwise, everything is fine(xattr,reflink,..etc)
>
>
> Testing script attached.
>
>
> Tristan.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for hard readonly mount
  2011-06-02 18:43         ` Sunil Mushran
@ 2011-06-03  1:00           ` Tristan Ye
  2011-06-03  1:05             ` Sunil Mushran
  0 siblings, 1 reply; 14+ messages in thread
From: Tristan Ye @ 2011-06-03  1:00 UTC (permalink / raw)
  To: ocfs2-devel

On 06/03/2011 02:43 AM, Sunil Mushran wrote:
> Tristan,
> 
> Please can you build a newer ocfs2-test rpm. The last one was built on
> 2009.

atop el6 with UEK kernel?


> 
> The stat -f discrepancy is probably due to localalloc. We shouldn't be
> reserving
> space for hard-ro mounts. So should be ok as long as the discrepancy can be
> accounted for.
> 
> # grep "LocalAlloc " /sys/kernel/debug/ocfs2/*/fs_state
> The last column * clustersize is the space reserved.
> 
> I have no clue what the "total" value comprises off. Can you look into
> that?

Sure

> 
> Sunil
> 
> On 06/01/2011 08:09 PM, Tristan Ye wrote:
>> Sunil Mushran wrote:
>>> On 05/26/2011 09:16 AM, Tristan Ye wrote:
>>>> On 05/27/2011 12:03 AM, Sunil Mushran wrote:
>>>>> Tiger, Thanks. Was this tested with all fs-features enabled? I am
>>>>> worried about quotas. If not, please test that.
>>>>>
>>>>> Tristan, Please can you cross check these patches. Enable all features
>>>>> in a volume, make it readonly and do mount, ls -lR, umount, read,
>>>>> stat,
>>>>> stat -f. This calls for a test script. We should be able to use
>>>>> loopback.
>>>>> losetup -rf.
>>>> Sure,
>>>>
>>>> I'm going to write a dedicated script for sanity check, including these
>>>> generic fs syscalls.
>>> Thanks Tristan.
>>>
>>> Tiger, I would suggest you roll up the patch into one. I see no reason
>>> for the breakup considering it fixes just one bug and is small enough.
>>
>> After running tests on block/loopback device, it shows that:
>>
>> 1. 'ls -lR /kernel/tree' dumps slightly different output:
>>
>> 6c6
>> <  total 436
>> ---
>>> total 428
>> 37c37
>> <  total 52
>> ---
>>> total 44
>> 394c394
>> <  total 252
>> ---
>>> total 228
>> 1408c1408
>> <  total 8
>> ---
>>> total 4
>> 1636c1636
>> <  total 8
>>
>> while the data is consistent anyway.
>>
>>
>> 2. 'stat -f' also dumps a slightly different map:
>>
>> 4,5c4,5
>> <  Blocks: Total: 176120528  Free: 170080504  Available: 170080504
>> <  Inodes: Total: 22015066   Free: 21260063
>> ---
>>> Blocks: Total: 176120528  Free: 170088304  Available: 170088304
>>> Inodes: Total: 22015066   Free: 21261038
>>
>> 3. Enabling quota on readonly fs caused kernel oops
>>
>> 4. Otherwise, everything is fine(xattr,reflink,..etc)
>>
>>
>> Testing script attached.
>>
>>
>> Tristan.
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for hard readonly mount
  2011-06-03  1:00           ` Tristan Ye
@ 2011-06-03  1:05             ` Sunil Mushran
  2011-06-03  1:14               ` Tristan Ye
  0 siblings, 1 reply; 14+ messages in thread
From: Sunil Mushran @ 2011-06-03  1:05 UTC (permalink / raw)
  To: ocfs2-devel

On 06/02/2011 06:00 PM, Tristan Ye wrote:
> On 06/03/2011 02:43 AM, Sunil Mushran wrote:
>> Tristan,
>>
>> Please can you build a newer ocfs2-test rpm. The last one was built on
>> 2009.
> atop el6 with UEK kernel?

It is userspace. So kernel should not matter. I guess both el5 and el6
would be nice.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for hard readonly mount
  2011-06-03  1:05             ` Sunil Mushran
@ 2011-06-03  1:14               ` Tristan Ye
  0 siblings, 0 replies; 14+ messages in thread
From: Tristan Ye @ 2011-06-03  1:14 UTC (permalink / raw)
  To: ocfs2-devel

On 06/03/2011 09:05 AM, Sunil Mushran wrote:
> On 06/02/2011 06:00 PM, Tristan Ye wrote:
>> On 06/03/2011 02:43 AM, Sunil Mushran wrote:
>>> Tristan,
>>>
>>> Please can you build a newer ocfs2-test rpm. The last one was built on
>>> 2009.
>> atop el6 with UEK kernel?
> 
> It is userspace. So kernel should not matter. I guess both el5 and el6
> would be nice.

Yep,
	But parts of its testcases were intentional for 1.6 ocfs2, and was
dependent on latest ocfs2-tools-devel, ok, it's also fine, still
userspace stuff;-)

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-06-03  1:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-26  9:40 [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for hard readonly mount Tiger Yang
2011-05-26  9:56 ` [Ocfs2-devel] [PATCH 1/4] ocfs2: No need to hangup cluster on " Tiger Yang
2011-05-26  9:57 ` [Ocfs2-devel] [PATCH 2/4] ocfs2: Add hard readonly check in open lock Tiger Yang
2011-05-26  9:57 ` [Ocfs2-devel] [PATCH 3/4] ocfs2: Get dinode buffer head on hard readonly mount Tiger Yang
2011-05-26  9:58 ` [Ocfs2-devel] [PATCH 4/4] ocfs2: Get readonly dentry lock " Tiger Yang
2011-05-26 16:03 ` [Ocfs2-devel] [PATCH 0/4] ocfs2: bugfix for " Sunil Mushran
2011-05-26 16:16   ` Tristan Ye
2011-05-26 16:21     ` Sunil Mushran
2011-06-02  3:09       ` Tristan Ye
2011-06-02 18:43         ` Sunil Mushran
2011-06-03  1:00           ` Tristan Ye
2011-06-03  1:05             ` Sunil Mushran
2011-06-03  1:14               ` Tristan Ye
2011-05-26 16:21   ` Tristan Ye

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.