public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Elder <aelder@sgi.com>
To: "Arkadiusz Miśkiewicz" <arekm@maven.pl>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH VER 6] Extend project quotas to support 32bit project identifiers.
Date: Fri, 01 Oct 2010 08:57:13 -0500	[thread overview]
Message-ID: <1285941433.5119.460.camel@doink> (raw)
In-Reply-To: <1285481418-31739-1-git-send-email-arekm@maven.pl>

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@maven.pl>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> ---

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@sgi.com>

> 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@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      parent reply	other threads:[~2010-10-01 13:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-26  6:10 [PATCH VER 6] Extend project quotas to support 32bit project identifiers Arkadiusz Miśkiewicz
2010-09-26  6:10 ` [PATCH VER 6] xfsprogs: projid32bit handling Arkadiusz Miśkiewicz
2010-09-26  6:10   ` [PATCH VER 6] xfstests: Quota project id setting overflow Arkadiusz Miśkiewicz
2010-10-01 13:57     ` Alex Elder
2010-09-26  6:13   ` [PATCH VER 6] xfsprogs: projid32bit handling Arkadiusz Miskiewicz
2010-10-01 13:57     ` Alex Elder
2010-10-01 13:57   ` Alex Elder
2010-09-28  1:43 ` [PATCH VER 6] Extend project quotas to support 32bit project identifiers Christoph Hellwig
2010-10-01 13:57 ` Alex Elder [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1285941433.5119.460.camel@doink \
    --to=aelder@sgi.com \
    --cc=arekm@maven.pl \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox