Re: [PATCH VER 6] Extend project quotas to support 32bit project identifiers.

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

 



On Sun, 2010-09-26 at 08:10 +0200, Arkadiusz MiÅkiewicz wrote:
> This patch adds support for 32bit project quota identifiers.
> 
> On disk format is backward compatible with 16bit projid numbers. projid
> on disk is now keept in two 16bit values - di_projid_lo (which holds the
> same position as old 16bit projid value) and new di_projid_hi (takes
> existing padding) and convertes from/to 32bit value on the fly.
> 
> xfs_admin (for existing fs), mkfs.xfs (for new fs) needs to be used
> to enable PROJID32BIT support.
> 
> Signed-off-by: Arkadiusz MiÅkiewicz <arekm@xxxxxxxx>
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> ---

Minor suggestion, below (which I can implement), otherwise this
looks good.

I didn't review it as carefully this time.  But the model now
is that 32-bit project id's are only supported if the filesystem
has that feature bit set.  And the feature bit is only set at
mkfs time or by xfs_db (not automatically as you had it before).
This sounds good to me.

Reviewed-by: Alex Elder <aelder@xxxxxxx>

> News:
> - use 0x80 instead of 0x20 for PROJID32BIT superblock bit (as 0x20
>   and 0x40 are reserved)
> - style fix

. . .

> diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.h b/fs/xfs/linux-2.6/xfs_ioctl32.h
> index 1024c4f..f92d662 100644
> --- a/fs/xfs/linux-2.6/xfs_ioctl32.h
> +++ b/fs/xfs/linux-2.6/xfs_ioctl32.h
> @@ -65,8 +65,9 @@ typedef struct compat_xfs_bstat {
>  	__s32		bs_extsize;	/* extent size			*/
>  	__s32		bs_extents;	/* number of extents		*/
>  	__u32		bs_gen;		/* generation count		*/
> -	__u16		bs_projid;	/* project id			*/
> -	unsigned char	bs_pad[14];	/* pad space, unused		*/
> +	__u16		bs_projid;	/* lower part of project id	*/

This could be:
          __u16           bs_projid_lo;   /* ... */
#define bs_projid bs_projid_lo

...to make it work with old code but be more consistent with new.

> +	__u16		bs_projid_hi;	/* high part of project id	*/
> +	unsigned char	bs_pad[12];	/* pad space, unused		*/
>  	__u32		bs_dmevmask;	/* DMIG event mask		*/
>  	__u16		bs_dmstate;	/* DMIG state info		*/
>  	__u16		bs_aextents;	/* attribute number of extents	*/

. . .

> diff --git a/fs/xfs/xfs_fs.h b/fs/xfs/xfs_fs.h
> index 87c2e9d..ae1c500 100644
> --- a/fs/xfs/xfs_fs.h
> +++ b/fs/xfs/xfs_fs.h
> @@ -293,9 +293,10 @@ typedef struct xfs_bstat {
>  	__s32		bs_extsize;	/* extent size			*/
>  	__s32		bs_extents;	/* number of extents		*/
>  	__u32		bs_gen;		/* generation count		*/
> -	__u16		bs_projid;	/* project id			*/
> +	__u16		bs_projid;	/* lower part of project id	*/

Same thing here.

>  	__u16		bs_forkoff;	/* inode fork offset in bytes	*/
> -	unsigned char	bs_pad[12];	/* pad space, unused		*/
> +	__u16		bs_projid_hi;	/* higher part of project id	*/
> +	unsigned char	bs_pad[10];	/* pad space, unused		*/
>  	__u32		bs_dmevmask;	/* DMIG event mask		*/
>  	__u16		bs_dmstate;	/* DMIG state info		*/
>  	__u16		bs_aextents;	/* attribute number of extents	*/

. . .

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



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux