[PATCH VER 6] xfsprogs: projid32bit handling
Alex Elder
aelder at sgi.com
Fri Oct 1 08:57:18 CDT 2010
On Sun, 2010-09-26 at 08:10 +0200, Arkadiusz Miśkiewicz wrote:
> Add projid32bit handling to userspace. mkfs.xfs is able to enable this
> feature for new filesystems. xfs_db knows what projid_lo/hi are.
>
> Signed-off-by: Arkadiusz Miśkiewicz <arekm at maven.pl>
> Reviewed-by: Christoph Hellwig <hch at lst.de>
This looks good (although I've only done a quick review).
I have found a few nits, below, which could be pretty
easily fixed before it's committed (by me unless some
else is going to do it).
I think it would be nice to have xfs_repair (and check)
report the existence of non-zero bs_projid_hi on a
filesystem without the PROJID32BIT superblock bit set.
But that wait.
Reviewed-by: Alex Elder <aelder at sgi.com>
> ---
>
> News:
> - use 0x80 instead of 0x20 for PROJID32BIT superblock bit (as 0x20
> and 0x40 are reserved)
. . .
> diff --git a/include/xfs_fs.h b/include/xfs_fs.h
> index 74e7274..9a51c64 100644
> --- a/include/xfs_fs.h
> +++ b/include/xfs_fs.h
> @@ -299,9 +299,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 */
This:
__u16 bs_projid_lo; /* lower part... */
#define bs_projid bs_projid_lo
...would make the old code compile but would make the
struct definition more consistent with the others.
> __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 */
. . .
> diff --git a/man/man8/mkfs.xfs.8 b/man/man8/mkfs.xfs.8
> index fdd38d4..a59bc89 100644
> --- a/man/man8/mkfs.xfs.8
> +++ b/man/man8/mkfs.xfs.8
> @@ -350,6 +350,13 @@ between attribute and extent data.
> The previous version 1, which has fixed regions for attribute and
> extent data, is kept for backwards compatibility with kernels older
> than version 2.6.16.
> +.TP
> +.BI projid32bit[= value]
projid32bit[=value]
> +This is used to enable 32bit quota project identifiers. The
> +.I value
> +is either 0 or 1, with 1 signifying that 32bit projid are to be enabled.
> +If the
If the value
> +is omitted, 0 is assumed.
> .RE
> .TP
> .BI \-l " log_section_options"
. . .
More information about the xfs
mailing list