All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valerie Aurora Henson <vaurora@redhat.com>
To: Andreas Dilger <adilger@sun.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [RFC PATCH 13/17] Support 48-bit file acl blocks
Date: Thu, 13 Nov 2008 21:30:22 -0500	[thread overview]
Message-ID: <20081114023022.GA20637@shell> (raw)
In-Reply-To: <20081113201109.GX16005@webber.adilger.int>

On Thu, Nov 13, 2008 at 01:14:50PM -0700, Andreas Dilger wrote:
> On Nov 11, 2008  19:43 -0800, Valerie Aurora Henson wrote:
> > @@ -82,8 +82,8 @@ struct dup_inode {
> >  	struct block_el		*block_list;
> >  };
> >  
> > -static int process_pass1b_block(ext2_filsys fs, blk_t	*blocknr,
> > -				e2_blkcnt_t blockcnt, blk_t ref_blk,
> > +static int process_pass1b_block(ext2_filsys fs, blk64_t	*blocknr,
> > +				e2_blkcnt_t blockcnt, blk64_t ref_blk,
> >  				int ref_offset, void *priv_data);
> >  static void delete_file(e2fsck_t ctx, ext2_ino_t ino,
> >  			struct dup_inode *dp, char *block_buf);
> > @@ -293,12 +293,15 @@ static void pass1b(e2fsck_t ctx, char *block_buf)
> > -			pctx.errcode = ext2fs_block_iterate2(fs, ino,
> > +			pctx.errcode = ext2fs_block_iterate3(fs, ino,
> >  					     BLOCK_FLAG_READ_ONLY, block_buf,
> >  					     process_pass1b_block, &pb);
> 
> Several of these changes should probably be part of the previous patch,
> since they are not really related to ACLs.

I'll go back and look at that, but in general it's hard to transition
from ext2fs_block_iterate2() ext2fs_block_iterate3() independently
because the iterate function has to convert to 64-bit at the same time
(or else you have to write complex and ugly glue code which lives for
exactly one revision).

> > + * XXX Ignoring 64-bit file system flag - most places where this is
> > + * called don't have access to the fs struct, and the high bits should
> > + * be 0 in the non-64-bit case anyway.
> > + */
> > +blk64_t ext2fs_file_acl_block(const struct ext2_inode *inode)
> > +{
> > +	return (inode->i_file_acl |
> > +		(__u64) inode->osd2.linux2.l_i_file_acl_high << 32);
> > +}
> > +
> > +/*
> > + * Set the acl block of a file
> > + */
> > +void ext2fs_file_acl_block_set(struct ext2_inode *inode, blk64_t blk)
> > +{
> > +	inode->i_file_acl = blk;
> > +	inode->osd2.linux2.l_i_file_acl_high = (__u64) blk >> 32;
> > +}
> 
> Does e2fsck validate the ACL block number is within the filesystem
> limits when it is checking the filesystem?

Yes, in check_ext_attr() in pass1.c (and in process_bad_inode() in
pass2.c).

> > diff --git a/lib/ext2fs/ext2_fs.h b/lib/ext2fs/ext2_fs.h
> > index d7d7bdb..3fa7555 100644
> > --- a/lib/ext2fs/ext2_fs.h
> > +++ b/lib/ext2fs/ext2_fs.h
> > @@ -343,7 +343,7 @@ struct ext2_inode {
> > -	__u32	i_dir_acl;	/* Directory ACL */
> > +	__u32	i_size_high;	/* Formerly i_dir_acl, directory ACL */
> >  	__u32	i_faddr;	/* Fragment address */
> >  	union {
> >  		struct {
> > @@ -390,7 +390,7 @@ struct ext2_inode_large {
> > -	__u32	i_dir_acl;	/* Directory ACL */
> > +	__u32	i_size_high;	/* Formerly i_dir_acl, directory ACL */
> > @@ -419,7 +419,7 @@ struct ext2_inode_large {
> > -#define i_size_high	i_dir_acl
> > +#define i_dir_acl	i_size_high
> 
> These changes should be landed upstream directly, independent of this patch.

Fine by me.  I'll include them with your "*_lo" rename suggestions if
Ted agrees.

-VAL

  reply	other threads:[~2008-11-14  2:30 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-12  3:42 [RFC,PATCH] 64-bit support for e2fsprogs Valerie Aurora Henson
2008-11-12  3:42 ` [RFC PATCH 01/17] Disable tst_refcount - doesn't compile, don't know why Valerie Aurora Henson
2008-11-12  3:42   ` [RFC PATCH 02/17] Squash warnings Valerie Aurora Henson
2008-11-12  3:42     ` [RFC PATCH 03/17] Add 64-bit bitops Valerie Aurora Henson
2008-11-12  3:42       ` [RFC PATCH 04/17] Implement 64-bit "bitarray" bmap ops Valerie Aurora Henson
2008-11-12  3:42         ` [RFC PATCH 05/17] Convert libext2fs to 64-bit bitmap interface Valerie Aurora Henson
2008-11-12  3:42           ` [RFC PATCH 06/17] Convert mke2fs to new " Valerie Aurora Henson
2008-11-12  3:43             ` [RFC PATCH 07/17] Convert e2fsck " Valerie Aurora Henson
2008-11-12  3:43               ` [RFC PATCH 08/17] Turn on new bitmaps in e2fsck and mke2fs Valerie Aurora Henson
2008-11-12  3:43                 ` [RFC PATCH 09/17] Add progress bar for allocating block tables - takes forever on large Valerie Aurora Henson
2008-11-12  3:43                   ` [RFC PATCH 10/17] signed int -> blk64_t to fix bugs at 2^31 - 2^32 blocks Valerie Aurora Henson
2008-11-12  3:43                     ` [RFC PATCH 11/17] Fix overflow in calculation of total file system blocks Valerie Aurora Henson
2008-11-12  3:43                       ` [RFC PATCH 12/17] Add ext2fs_block_iterate3 (from Ted) Valerie Aurora Henson
2008-11-12  3:43                         ` [RFC PATCH 13/17] Support 48-bit file acl blocks Valerie Aurora Henson
2008-11-12  3:43                           ` [RFC PATCH 14/17] super->s_*_blocks_count -> ext2fs_*_blocks_count() Valerie Aurora Henson
2008-11-12  3:43                             ` [RFC PATCH 15/17] Convert to inode/block/bitmap/table loc()/loc_set() functions Valerie Aurora Henson
2008-11-12  3:43                               ` [RFC PATCH 16/17] ext2fs_block_alloc_stats -> ext2fs_block_alloc_stats2 Valerie Aurora Henson
2008-11-12  3:43                                 ` [RFC PATCH 17/17] Convert to 64-bit IO Valerie Aurora Henson
2008-11-13 20:26                               ` [RFC PATCH 15/17] Convert to inode/block/bitmap/table loc()/loc_set() functions Andreas Dilger
2008-11-13 20:24                             ` [RFC PATCH 14/17] super->s_*_blocks_count -> ext2fs_*_blocks_count() Andreas Dilger
2008-11-14  3:25                               ` Valerie Aurora Henson
2008-11-14 16:24                                 ` Eric Sandeen
2008-11-13 20:14                           ` [RFC PATCH 13/17] Support 48-bit file acl blocks Andreas Dilger
2008-11-14  2:30                             ` Valerie Aurora Henson [this message]
2008-11-13 20:04                       ` [RFC PATCH 11/17] Fix overflow in calculation of total file system blocks Andreas Dilger
2008-11-14  2:34                         ` Valerie Aurora Henson
2008-11-14  3:10                         ` 64-bit inode support in e2fsprogs? (was Re: [RFC PATCH 11/17] Fix overflow in calculation of total file system blocks) Valerie Aurora Henson
2008-11-14 20:32                           ` Andreas Dilger
2008-11-13 19:57                     ` [RFC PATCH 10/17] signed int -> blk64_t to fix bugs at 2^31 - 2^32 blocks Andreas Dilger
2008-11-14  2:38                       ` Valerie Aurora Henson
2008-11-14  3:42                         ` Eric Sandeen
2008-11-14  3:54                           ` Valerie Aurora Henson
2008-11-14  4:04                             ` Eric Sandeen
2008-11-14 14:24                         ` Theodore Tso
2008-11-14 20:35                           ` Andreas Dilger
2008-11-16 15:06                         ` Theodore Tso
2008-11-13 19:54                   ` [RFC PATCH 09/17] Add progress bar for allocating block tables - takes forever on large Andreas Dilger
2008-11-14  2:45                     ` Valerie Aurora Henson
2008-11-12 20:47         ` [RFC PATCH 04/17] Implement 64-bit "bitarray" bmap ops Andreas Dilger
2008-11-14  2:59           ` Valerie Aurora Henson
2008-11-12 20:25 ` [RFC,PATCH] 64-bit support for e2fsprogs Andreas Dilger
2008-11-13 20:30   ` Theodore Tso
2008-11-14  3:01     ` Valerie Aurora Henson

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=20081114023022.GA20637@shell \
    --to=vaurora@redhat.com \
    --cc=adilger@sun.com \
    --cc=linux-ext4@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.