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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 12 Jun 2007 04:10:20 -0600
From:	Andreas Dilger <adilger@...sterfs.com>
To:	Valerie Clement <valerie.clement@...l.net>
Cc:	Theodore Tso <tytso@....edu>,
	ext4 development <linux-ext4@...r.kernel.org>
Subject: Re: [RFC][PATCH 8/12] 48-bit extents in e2fsprogs

On Jun 11, 2007  18:47 +0200, Valerie Clement wrote:
> +#ifdef _EXT4FS_
> +#define EXT4_EE_START(e) (((__u64)(e)->ee_start_hi << 32) + (e)->ee_start)
> +#define EXT4_EI_LEAF(ix) (((__u64)(ix)->ei_leaf_hi << 32) + (ix)->ei_leaf)
> +
> +#define EXT4_EE_START_SET(e,blk)			\
> +	do {						\
> +		(e)->ee_start = (blk);			\
> +		(e)->ee_start_hi = (blk) >> 32;		\
> +	} while(0)
> +
> +#define EXT4_EI_LEAF_SET(e,blk)				\
> +	do {						\
> +		(ix)->ei_leaf = (blk);			\
> +		(ix)->ei_leaf_hi = (blk) >> 32;		\
> +	} while(0)
> +#else
> +#define EXT4_EE_START(e)	((e)->ee_start)
> +#define EXT4_EI_LEAF(ix)	((ix)->ei_leaf)
> +
> +#define EXT4_EE_START_SET(e,blk)			\
> +	do {						\
> +		(e)->ee_start = (blk);			\
> +	} while(0)
> +
> +#define EXT4_EI_LEAF_SET(e,blk)				\
> +	do {						\
> +		(ix)->ei_leaf = (blk);			\
> +	} while(0)
> +#endif

Ideally this would also be conditional upon INCOMPAT_64BIT and the fs > 2^32
blocks, because some older versions of the extents code didn't clear the
ee_start_hi and ei_lead fields correctly.

That said, I'm not always sure we have access to a superblock somehow
in every function where we need this macro, and we've been shipping
extents patches and e2fsck which has fixed this problem, but not all of
our customers/partners are using the latest lustre or e2fsprogs, or
have necessarily run e2fsck on their filesystems..

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

-
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