public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [help] project quota information incorrect over nfs ...
@ 2010-01-21  4:12 Guk-Bong, Kwon
  2010-01-21 11:17 ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Guk-Bong, Kwon @ 2010-01-21  4:12 UTC (permalink / raw)
  To: xfs

hi all

i tested xfs project quota over nfs...

exported directory(/test/111) df size, df used is correct. but df avail is
incorrect...

=====================================================================
linux nfs server
=====================================================================

#uname -a
Linux 2.6.27.23 #2 SMP Wed May 20 15:35:13 KST 2009 x86_64 Intel(R) Xeon(R)
CPU E5405 @ 2.00GHz GenuineIntel GNU/Linux

#xfs_repair  -V
xfs_repair version 2.9.8

#df
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             5.0G  2.2G  2.6G  47% /
/dev/sda2             5.0G  180M  4.5G   4% /var
none                  250M   44K  249M   1% /dev/shm
/dev/mapper/LD-test  1014M  500M  500M  50% /test

#cat /proc/mounts
rootfs / rootfs rw 0 0
/proc /proc proc rw 0 0
/dev/root / ext3 rw,noatime,nodiratime,errors=continue,data=journal 0 0
/proc /proc proc rw 0 0
/sys /sys sysfs rw 0 0
/dev/shm /dev/shm tmpfs rw 0 0
none /dev/pts devpts rw,gid=5,mode=620 0 0
nfsd /proc/fs/nfsd nfsd rw 0 0
/dev/sda2 /var ext3 rw,noatime,nodiratime,errors=continue,data=journal 0 0
/dev/LD/test /test xfs rw,noatime,attr2,nobarrier,prjquota,grpquota 0 0

#cat /etc/projid
1:1

#cat /etc/projects
1:/test/111

# xfs_quota -x -c 'report -p -b -h' /test
Project quota on /test (/dev/LD/test)
                        Blocks
Project ID   Used   Soft   Hard Warn/Grace
---------- ---------------------------------
1               0      0   100M  00 [------]

#ls -al /test/111/
total 0
drwxrwxrwx 2 root root   6 Jan 19 06:42 ./
drwxr-xr-x 3 root root 116 Jan 19 11:08 ../

#exportfs  -v
/test/111 0.0.0.0/0.0.0.0(rw,async,wdelay,no_root_squash,no_subtree_check)

=====================================================================
linux nfs client
=====================================================================
$ uname -a
Linux 2.6.32.2 #2 Mon Jan 11 16:32:50 KST 2010 x86_64 AMD Athlon(tm) 64
Processor 3000+ AuthenticAMD GNU/Linux

$ mount -t nfs nfs_server:/test/111 /mnt/nfs

$ cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext3 rw,noatime,errors=continue,data=writeback 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
udev /dev tmpfs rw,nosuid,relatime,size=10240k,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0
none /dev/shm tmpfs rw,relatime 0 0
nfsd /proc/fs/nfsd nfsd rw,nosuid,nodev,noexec,relatime 0 0
nfs_server:/test/111 /mnt/nfs nfs
rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.0.160,mountvers=3,mountproto=tcp,addr=192.168.0.160
0 0

$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda2             9.4G  5.4G  3.7G  60% /
udev                   10M  196K  9.9M   2% /dev
none                  250M     0  250M   0% /dev/shm
nfs_server:/test/111
                      100M     0  500M   0% /mnt/nfs

$ ls -al /mnt/nfs/
total 4.0K
drwxrwxrwx  2 root root    6 2010-01-19 06:42 ./
drwxr-xr-x 73 root root 4.0K 2009-03-03 19:34 ../

=====================================================================

nfs client "nfs_server:/test/111" Size is correct..(100M)

but nfs client "nfs_server:/test/111" Avail is incorrect.. (500M)

"Avail" is big than "Size" ...

this stat is normal??

--

thanks

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [help] project quota information incorrect over nfs ...
  2010-01-21  4:12 [help] project quota information incorrect over nfs Guk-Bong, Kwon
@ 2010-01-21 11:17 ` Christoph Hellwig
  2010-01-21 21:55   ` Alex Elder
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2010-01-21 11:17 UTC (permalink / raw)
  To: Guk-Bong, Kwon; +Cc: xfs

On Thu, Jan 21, 2010 at 01:12:06PM +0900, Guk-Bong, Kwon wrote:
> nfs client "nfs_server:/test/111" Size is correct..(100M)
> 
> but nfs client "nfs_server:/test/111" Avail is incorrect.. (500M)
> 
> "Avail" is big than "Size" ...
> 
> this stat is normal??

No, it's not.  The patch below should fix it, but I'm not sure how
easily backportable it is to 2.6.27:

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/fs/xfs/quota/xfs_qm_bhv.c
===================================================================
--- linux-2.6.orig/fs/xfs/quota/xfs_qm_bhv.c	2010-01-21 12:13:51.397003969 +0100
+++ linux-2.6/fs/xfs/quota/xfs_qm_bhv.c	2010-01-21 12:14:14.290009571 +0100
@@ -59,7 +59,7 @@ xfs_fill_statvfs_from_dquot(
 		be64_to_cpu(dp->d_blk_hardlimit);
 	if (limit && statp->f_blocks > limit) {
 		statp->f_blocks = limit;
-		statp->f_bfree =
+		statp->f_bfree = statp->f_bavail =
 			(statp->f_blocks > be64_to_cpu(dp->d_bcount)) ?
 			 (statp->f_blocks - be64_to_cpu(dp->d_bcount)) : 0;
 	}

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* RE: [help] project quota information incorrect over nfs ...
  2010-01-21 11:17 ` Christoph Hellwig
@ 2010-01-21 21:55   ` Alex Elder
  2010-01-22  9:54     ` Guk-Bong, Kwon
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Elder @ 2010-01-21 21:55 UTC (permalink / raw)
  To: Christoph Hellwig, Guk-Bong, Kwon; +Cc: xfs

Christoph Hellwig wrote:
> On Thu, Jan 21, 2010 at 01:12:06PM +0900, Guk-Bong, Kwon wrote:
>> nfs client "nfs_server:/test/111" Size is correct..(100M)
>> 
>> but nfs client "nfs_server:/test/111" Avail is incorrect.. (500M)
>> 
>> "Avail" is big than "Size" ...
>> 
>> this stat is normal??
> 
> No, it's not.  The patch below should fix it, but I'm not sure how
> easily backportable it is to 2.6.27:

I'm going to take this as a [PATCH] and say it looks good to me.
It will probably not be difficult for someone to port it back
to 2.6.27.

> Signed-off-by: Christoph Hellwig <hch@lst.de>

Reviewed-by: Alex Elder <aelder@sgi.com>

> Index: linux-2.6/fs/xfs/quota/xfs_qm_bhv.c
> ===================================================================
> --- linux-2.6.orig/fs/xfs/quota/xfs_qm_bhv.c	2010-01-21 12:13:51.397003969 +0100
> +++ linux-2.6/fs/xfs/quota/xfs_qm_bhv.c	2010-01-21 12:14:14.290009571 +0100
> @@ -59,7 +59,7 @@ xfs_fill_statvfs_from_dquot(
>  		be64_to_cpu(dp->d_blk_hardlimit);
>  	if (limit && statp->f_blocks > limit) {
>  		statp->f_blocks = limit;
> -		statp->f_bfree =
> +		statp->f_bfree = statp->f_bavail =
>  			(statp->f_blocks > be64_to_cpu(dp->d_bcount)) ?
>  			 (statp->f_blocks - be64_to_cpu(dp->d_bcount)) : 0;
>  	}
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [help] project quota information incorrect over nfs ...
  2010-01-21 21:55   ` Alex Elder
@ 2010-01-22  9:54     ` Guk-Bong, Kwon
  0 siblings, 0 replies; 4+ messages in thread
From: Guk-Bong, Kwon @ 2010-01-22  9:54 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs, Alex Elder

first.. thanks for your interest

your patches is correct..

2010/1/22 Alex Elder <aelder@sgi.com>:
> Christoph Hellwig wrote:
>> On Thu, Jan 21, 2010 at 01:12:06PM +0900, Guk-Bong, Kwon wrote:
>>> nfs client "nfs_server:/test/111" Size is correct..(100M)
>>>
>>> but nfs client "nfs_server:/test/111" Avail is incorrect.. (500M)
>>>
>>> "Avail" is big than "Size" ...
>>>
>>> this stat is normal??
>>
>> No, it's not.  The patch below should fix it, but I'm not sure how
>> easily backportable it is to 2.6.27:
>
> I'm going to take this as a [PATCH] and say it looks good to me.
> It will probably not be difficult for someone to port it back
> to 2.6.27.
>
>> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> Reviewed-by: Alex Elder <aelder@sgi.com>
>
>> Index: linux-2.6/fs/xfs/quota/xfs_qm_bhv.c
>> ===================================================================
>> --- linux-2.6.orig/fs/xfs/quota/xfs_qm_bhv.c  2010-01-21 12:13:51.397003969 +0100
>> +++ linux-2.6/fs/xfs/quota/xfs_qm_bhv.c       2010-01-21 12:14:14.290009571 +0100
>> @@ -59,7 +59,7 @@ xfs_fill_statvfs_from_dquot(
>>               be64_to_cpu(dp->d_blk_hardlimit);
>>       if (limit && statp->f_blocks > limit) {
>>               statp->f_blocks = limit;
>> -             statp->f_bfree =
>> +             statp->f_bfree = statp->f_bavail =
>>                       (statp->f_blocks > be64_to_cpu(dp->d_bcount)) ?
>>                        (statp->f_blocks - be64_to_cpu(dp->d_bcount)) : 0;
>>       }
>>
>> _______________________________________________
>> xfs mailing list
>> xfs@oss.sgi.com
>> http://oss.sgi.com/mailman/listinfo/xfs
>
>



-- 
감사 합니다.

권국봉.

=================================================
  Senior Researcher Guk-Bong, Kwon
  GLUESYS Co., Ltd., Research Center
  705 Ho, Anyang K-center Building , 1591-9,
  Burim-dong, Dongan-gu, Anyang-si, Gyeonggi-do,
  431-815, Republic of Korea
  Tel : +82-31-388-3260(401)
  Fax : +82-31-388-3261
  Mobile : +82-10-2584-1976
  E-mail : gbkwon@gluesys.com, gbkwon@gmail.com
  Homepage : http://www.gluesys.com/
=================================================

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

end of thread, other threads:[~2010-01-22  9:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-21  4:12 [help] project quota information incorrect over nfs Guk-Bong, Kwon
2010-01-21 11:17 ` Christoph Hellwig
2010-01-21 21:55   ` Alex Elder
2010-01-22  9:54     ` Guk-Bong, Kwon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox