Re: [PATCH 2/3] quota: unify ->get_dqblk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, 2010-05-05 at 06:39 -0400, Christoph Hellwig wrote:
> plain text document attachment (quota-common-get_dqblk)
> Pass the larger struct fs_disk_quota to the ->get_dqblk operation so
> that the Q_GETQUOTA and Q_XGETQUOTA operations can be implemented
> with a single filesystem operation and we can retire the ->get_xquota
> operation.  The additional information (RT-subvolume accounting and
> warn counts) are left zero for the VFS quota implementation.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> 
> Index: linux-2.6/fs/quota/quota.c
> ===================================================================
> --- linux-2.6.orig/fs/quota/quota.c	2010-05-05 11:57:38.000000000 +0200
> +++ linux-2.6/fs/quota/quota.c	2010-05-05 11:58:46.681263382 +0200
> @@ -136,19 +136,32 @@ static int quota_setinfo(struct super_bl
>  	return sb->s_qcop->set_info(sb, type, &info);
>  }
>  
> +static void copy_to_if_dqblk(struct if_dqblk *dst, struct fs_disk_quota *src)
> +{
> +	dst->dqb_bhardlimit = src->d_blk_hardlimit;
> +	dst->dqb_bsoftlimit = src->d_blk_softlimit;
> +	dst->dqb_curspace = src->d_bcount;
> +	dst->dqb_ihardlimit = src->d_ino_hardlimit;
> +	dst->dqb_isoftlimit = src->d_ino_softlimit;
> +	dst->dqb_curinodes = src->d_icount;
> +	dst->dqb_btime = src->d_btimer;
> +	dst->dqb_itime = src->d_itimer;
> +	dst->dqb_valid = QIF_ALL;
Do the fields needs to be individually marked as valid according to what
is supported by a filesystem or can we always assume that a zero value
means unknown/unsupported?

Otherwise it looks good to me,

Steve.


--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux