lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 15 Sep 2011 04:06:06 -0600
From:	Andreas Dilger <adilger.kernel@...ger.ca>
To:	Amir Goldstein <amir73il@...il.com>
Cc:	"Ted Ts'o" <tytso@....edu>, "Darrick J. Wong" <djwong@...ibm.com>,
	Sunil Mushran <sunil.mushran@...cle.com>,
	Andi Kleen <andi@...stfloor.org>,
	Mingming Cao <cmm@...ibm.com>,
	Joel Becker <jlbec@...lplan.org>, linux-ext4@...r.kernel.org,
	Coly Li <colyli@...il.com>,
	Yongqiang Yang <xiaoqiangnk@...il.com>
Subject: Re: [PATCH] libext2fs: reserve exclude bitmap fields in group descriptor

On 2011-09-15, at 12:50 AM, Amir Goldstein wrote:
> Here is a patch to reserve the exclude bitmap field, so we won't
> forget them again...
> The full patch series for adding exclude bitmap can be found here:
> https://github.com/amir73il/e2fsprogs-snapshots-patch-queue
> 
> ---
> From: Amir Goldstein <amir73il@...rs.sf.net>
> Date: Thu, 15 Sep 2011 09:42:38 +0300
> 
> Ext4 snapshots require the compatible feature 'exclude_bitmap', meaning that
> the exclude bitmap was allocated.
> The allocated exclude bitmap blocks are stored in the block group descriptors.
> 
> To allow easy migration of existing Next3 installations, I took the liberty
> of 'burning' the old 'exclude_inode' compatible flag and using a new
> 'exclude_bitmap' comaptible flag, to state the exclude bitmap blocks are stored
> in the group descriptors.
> 
> Signed-off-by: Amir Goldstein <amir73il@...rs.sf.net>
> ---
> lib/ext2fs/ext2_fs.h |   13 +++++++++----
> 1 files changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/ext2fs/ext2_fs.h b/lib/ext2fs/ext2_fs.h
> index 54cb3d4..f1f0e19 100644
> --- a/lib/ext2fs/ext2_fs.h
> +++ b/lib/ext2fs/ext2_fs.h
> @@ -142,7 +142,8 @@ struct ext2_group_desc
>        __u16   bg_free_inodes_count;   /* Free inodes count */
>        __u16   bg_used_dirs_count;     /* Directories count */
>        __u16   bg_flags;
> -       __u32   bg_reserved[2];
> +       __u32   bg_exclude_bitmap;      /* Exclude bitmap block */

I'd prefer if these comments were "Snapshot exclude bitmap block" so
that it is more clear what an exclude bitmap is used for.

For consistency, it would also be good to name these "_lo" to match the
kernel fields.

> +       __u32   bg_reserved[1];
>        __u16   bg_itable_unused;       /* Unused inodes count */
>        __u16   bg_checksum;            /* crc16(s_uuid+grouo_num+group_desc)*/
> };
> @@ -159,7 +160,8 @@ struct ext4_group_desc
>        __u16   bg_free_inodes_count;   /* Free inodes count */
>        __u16   bg_used_dirs_count;     /* Directories count */
>        __u16   bg_flags;               /* EXT4_BG_flags (INODE_UNINIT, etc) */
> -       __u32   bg_reserved[2];         /* Likely block/inode bitmap checksum */
> +       __u32   bg_exclude_bitmap;      /* Exclude bitmap block */
> +       __u32   bg_reserved[1];         /* Likely block/inode bitmap checksum */
>        __u16   bg_itable_unused;       /* Unused inodes count */
>        __u16   bg_checksum;            /* crc16(sb_uuid+group+desc) */
>        __u32   bg_block_bitmap_hi;     /* Blocks bitmap block MSB */
> 
> @@ -169,12 +171,14 @@ struct ext4_group_desc
>        __u16   bg_free_inodes_count_hi;/* Free inodes count MSB */
>        __u16   bg_used_dirs_count_hi;  /* Directories count MSB */
>        __u16   bg_itable_unused_hi;    /* Unused inodes count MSB */
> -       __u32   bg_reserved2[3];
> +       __u32   bg_exclude_bitmap_hi;   /* Exclude bitmap block MSB */
> +       __u32   bg_reserved2[2];
> };
> 
> #define EXT2_BG_INODE_UNINIT   0x0001 /* Inode table/bitmap not initialized */
> #define EXT2_BG_BLOCK_UNINIT   0x0002 /* Block bitmap not initialized */
> #define EXT2_BG_INODE_ZEROED   0x0004 /* On-disk itable initialized to zero */
> +#define EXT2_BG_EXCLUDE_UNINIT 0x0008 /* Exclude bitmap not initialized */
> 
> /*
>  * Data structures used by the directory indexing feature
> @@ -670,7 +674,8 @@ struct ext2_super_block {
> #define EXT2_FEATURE_COMPAT_RESIZE_INODE       0x0010
> #define EXT2_FEATURE_COMPAT_DIR_INDEX          0x0020
> #define EXT2_FEATURE_COMPAT_LAZY_BG            0x0040
> -#define EXT2_FEATURE_COMPAT_EXCLUDE_INODE      0x0080
> +/* #define EXT2_FEATURE_COMPAT_EXCLUDE_INODE   0x0080 not used */
> +#define EXT2_FEATURE_COMPAT_EXCLUDE_BITMAP     0x0100
> 
> #define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER    0x0001
> #define EXT2_FEATURE_RO_COMPAT_LARGE_FILE      0x0002
> --
> 1.7.0.4


Cheers, Andreas





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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ