Skip to contentSkip to conversation

xfstest generic/280: wait for setquota to finish before umount

PATCH In review Guangyu Sun 5 participants 5 messages Oct 24, 2013 – Dec 3, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfstest generic/280: wait for setquota to finish before umount

While running xfstest 280, we occasionally got such error:

setquota: Cannot set quota for user 0 from kernel on /dev/mapper/xfstests-disk1: No such device
setquota: Cannot write quota for 0 on /dev/mapper/xfstests-disk1: No such device

setquota calls syscall quotactl, and the kernel will wait for the filesystem to unfreeze and then performs command. Then kernel will double check if the device is still mounted. If not, an ENODEV will be thrown.

While in the testcase, unfreeze and umount might be so close that the device got umounted before quotactl is performed.

---
 tests/generic/280 |    1 +
 1 file changed, 1 insertion(+)
tests/generic/280 +1 -0
index 5491a6b..815a2c5 100755
@@ -63,6 +63,7 @@ xfs_freeze -f $SCRATCH_MNT
 setquota -u root 1 2 3 4 $SCRATCH_MNT &
 sleep 1
 xfs_freeze -u $SCRATCH_MNT
+sleep 1
 umount $SCRATCH_DEV
 
 # Failure comes in the form of a deadlock.
Signature · 6 lines
1.7.9.5

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#1 lore raw
Quoted 11 lines · Guangyu Sun

While running xfstest 280, we occasionally got such error:

setquota: Cannot set quota for user 0 from kernel on /dev/mapper/xfstests-disk1: No such device
setquota: Cannot write quota for 0 on /dev/mapper/xfstests-disk1: No such device

setquota calls syscall quotactl, and the kernel will wait for the filesystem to unfreeze and then performs command. Then kernel will double check if the device is still mounted. If not, an ENODEV will be thrown.

Quoted 8 lines

While in the testcase, unfreeze and umount might be so close that the device got umounted before quotactl is performed.

---
  tests/generic/280 |    1 +
  1 file changed, 1 insertion(+)

Hi!

Could anybody review this?

Thanks.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 1/1
#2 lore raw
In reply to Guangyu Sun
Quoted 11 lines · Guangyu Sun

While running xfstest 280, we occasionally got such error:

setquota: Cannot set quota for user 0 from kernel on /dev/mapper/xfstests-disk1: No such device
setquota: Cannot write quota for 0 on /dev/mapper/xfstests-disk1: No such device

setquota calls syscall quotactl, and the kernel will wait for the filesystem to unfreeze and then performs command. Then kernel will double check if the device is still mounted. If not, an ENODEV will be thrown.

Quoted 5 lines

While in the testcase, unfreeze and umount might be so close that the device got umounted before quotactl is performed.

Wanted to make sure the sleep didn't disturb the deadlock it's testing, and it doesn't. So:

Thanks,
-Eric

Quoted 10 lines
---
 tests/generic/280 |    1 +
 1 file changed, 1 insertion(+)
tests/generic/280 +0 -0
index 5491a6b..815a2c5 100755

tests/generic/280 xfs_freeze -f $SCRATCH_MNT · line 69

Quoted 7 lines
tests/generic/280 +1 -0
@@ -63,6 +63,7 @@ xfs_freeze -f $SCRATCH_MNT
 setquota -u root 1 2 3 4 $SCRATCH_MNT &
 sleep 1
 xfs_freeze -u $SCRATCH_MNT
+sleep 1
 umount $SCRATCH_DEV
 
 # Failure comes in the form of a deadlock.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#4 lore raw
Quoted 10 lines · Rich Johnston

This has been committed.

Thanks
--Rich

commit 527eeb43e5c7cfd642d81bc3c12e746d2a3733ff

Author: Guangyu Sun <[email protected]>
Date:   Thu Oct 24 17:56:21 2013 +0000

xfstest generic/280: wait for setquota to finish before umount

Rich, I know you read the email I sent about trying to introduce some conventions for patch subject lines for xfstests commits. Cleanliness in the commit history is important, and it's something that we need to focus on to ensure we all commit patches using the same conventions.

Hence if you are going to commit patches independently, can you can you please rewrite the commit messages to follow the conventions I outlined?

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs