From: Zheng Liu <gnehzuil.liu@gmail.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-ext4@vger.kernel.org, Theodore Ts'o <tytso@mit.edu>,
Zheng Liu <wenqing.lz@taobao.com>
Subject: Re: [PATCH v3 09/30] libext2fs: check inline_data in ext2fs_xattrs_read/write
Date: Sat, 7 Dec 2013 11:45:02 +0800 [thread overview]
Message-ID: <20131207034502.GB13745@gmail.com> (raw)
In-Reply-To: <20131206213826.GB10143@birch.djwong.org>
On Fri, Dec 06, 2013 at 01:38:26PM -0800, Darrick J. Wong wrote:
> On Fri, Dec 06, 2013 at 05:57:56PM +0800, Zheng Liu wrote:
> > From: Zheng Liu <wenqing.lz@taobao.com>
> >
> > Now on kernel side we can enable inline data even without ext_attr. So
> > we need to adjust sanity check on ext2fs_xattrs_read/write to let we
> > access extended attribute when filesystem is create with '-O ^ext_attr,
> > inline_data'.
>
> Oops, I removed both of those checks in favor of looking for ext_attr or
> inline_data in ext2fs_xattrs_open(). Oh well, sorry about the
> miscommunication.
Got it. I am happy to rebase against your latest patch.
Thanks,
- Zheng
>
> --D
>
> >
> > Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
> > ---
> > lib/ext2fs/ext_attr.c | 28 ++++++++++++++++++++++------
> > 1 file changed, 22 insertions(+), 6 deletions(-)
> >
> > diff --git a/lib/ext2fs/ext_attr.c b/lib/ext2fs/ext_attr.c
> > index 09e13b2..e5e0fa9 100644
> > --- a/lib/ext2fs/ext_attr.c
> > +++ b/lib/ext2fs/ext_attr.c
> > @@ -469,9 +469,17 @@ errcode_t ext2fs_xattrs_write(struct ext2_xattr_handle *handle)
> > unsigned int i;
> > errcode_t err;
> >
> > - if (!EXT2_HAS_COMPAT_FEATURE(handle->fs->super,
> > - EXT2_FEATURE_COMPAT_EXT_ATTR))
> > - return 0;
> > + /*
> > + * If inline_data is enabled, we don't check ext_attr because
> > + * inline_data needs to read/write extended attribute even
> > + * without ext_attr.
> > + */
> > + if (!EXT2_HAS_INCOMPAT_FEATURE(handle->fs->super,
> > + EXT4_FEATURE_INCOMPAT_INLINE_DATA)) {
> > + if (!EXT2_HAS_COMPAT_FEATURE(handle->fs->super,
> > + EXT2_FEATURE_COMPAT_EXT_ATTR))
> > + return 0;
> > + }
> >
> > i = EXT2_INODE_SIZE(handle->fs->super);
> > if (i < sizeof(*inode))
> > @@ -684,9 +692,17 @@ errcode_t ext2fs_xattrs_read(struct ext2_xattr_handle *handle)
> > int i;
> > errcode_t err;
> >
> > - if (!EXT2_HAS_COMPAT_FEATURE(handle->fs->super,
> > - EXT2_FEATURE_COMPAT_EXT_ATTR))
> > - return 0;
> > + /*
> > + * If inline_data is enabled, we don't check ext_attr because
> > + * inline_data needs to read/write extended attribute even
> > + * without ext_attr.
> > + */
> > + if (!EXT2_HAS_INCOMPAT_FEATURE(handle->fs->super,
> > + EXT4_FEATURE_INCOMPAT_INLINE_DATA)) {
> > + if (!EXT2_HAS_COMPAT_FEATURE(handle->fs->super,
> > + EXT2_FEATURE_COMPAT_EXT_ATTR))
> > + return 0;
> > + }
> >
> > i = EXT2_INODE_SIZE(handle->fs->super);
> > if (i < sizeof(*inode))
> > --
> > 1.7.9.7
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-12-07 3:42 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-06 9:57 [PATCH v3 00/30] e2fsprogs: inline data refinement patch set Zheng Liu
2013-12-06 9:57 ` [PATCH v3 01/30] libext2fs: support modifying arbitrary extended attributes Zheng Liu
2013-12-06 9:57 ` [PATCH v3 02/30] libext2fs: various tweaks to the xattr editor APIs Zheng Liu
2013-12-06 9:57 ` [PATCH v3 03/30] libext2fs: extend xattr api to query number of attrs Zheng Liu
2013-12-06 9:57 ` [PATCH v3 04/30] libext2fs: fix memory leaks in extended attribute code Zheng Liu
2013-12-06 9:57 ` [PATCH v3 05/30] libext2fs: fix block leak when releasing xattr block Zheng Liu
2013-12-06 9:57 ` [PATCH v3 06/30] libext2fs: remove redundant code Zheng Liu
2013-12-06 9:57 ` [PATCH v3 07/30] libext2fs: free key/value pairs before reading Zheng Liu
2013-12-06 9:57 ` [PATCH v3 08/30] debugfs: dump all extended attributes Zheng Liu
2013-12-06 9:57 ` [PATCH v3 09/30] libext2fs: check inline_data in ext2fs_xattrs_read/write Zheng Liu
2013-12-06 21:38 ` Darrick J. Wong
2013-12-07 3:45 ` Zheng Liu [this message]
2014-03-03 23:33 ` Darrick J. Wong
2013-12-06 9:57 ` [PATCH v3 10/30] libext2fs: define new dirent_swab interfaces for inline data Zheng Liu
2014-03-03 15:49 ` Theodore Ts'o
2014-03-13 16:32 ` jon ernst
2014-03-14 2:44 ` Theodore Ts'o
2013-12-06 9:57 ` [PATCH v3 11/30] libext2fs: handle inline data in dir iterator function Zheng Liu
2014-03-03 22:16 ` Theodore Ts'o
2014-03-03 23:31 ` Darrick J. Wong
2014-03-04 13:56 ` Theodore Ts'o
2014-03-04 4:48 ` Zheng Liu
2013-12-06 9:57 ` [PATCH v3 12/30] libext2fs: handle inline_data in block " Zheng Liu
2013-12-06 9:58 ` [PATCH v3 13/30] debugfs: make stat command support inline data Zheng Liu
2013-12-06 9:58 ` [PATCH v3 14/30] debugfs: make expand " Zheng Liu
2013-12-06 9:58 ` [PATCH v3 15/30] debugfs: make mkdir " Zheng Liu
2013-12-06 9:58 ` [PATCH v3 16/30] debugfs: make lsdel " Zheng Liu
2013-12-06 9:58 ` [PATCH v3 17/30] debugfs: handle inline_data feature in bmap command Zheng Liu
2013-12-06 9:58 ` [PATCH v3 18/30] debugfs: handle inline data feature in punch command Zheng Liu
2013-12-06 9:58 ` [PATCH v3 19/30] libext2fs: handle inline data in read/write function Zheng Liu
2014-03-03 23:57 ` Darrick J. Wong
2013-12-06 9:58 ` [PATCH v3 20/30] libext2fs: add inline_data feature into EXT2_LIB_FEATURE_INCOMPAT_SUPP Zheng Liu
2013-12-06 9:58 ` [PATCH v3 21/30] mke2fs: add inline_data support in mke2fs Zheng Liu
2013-12-06 9:58 ` [PATCH v3 22/30] tune2fs: add inline_data feature in tune2fs Zheng Liu
2013-12-10 21:06 ` Darrick J. Wong
2013-12-06 9:58 ` [PATCH v3 23/30] e2fsck: add problem descriptions and check inline data feature Zheng Liu
2013-12-06 9:58 ` [PATCH v3 24/30] e2fsck: check inline_data in pass1 Zheng Liu
2014-03-03 22:18 ` Theodore Ts'o
2014-03-04 4:51 ` Zheng Liu
2013-12-06 9:58 ` [PATCH v3 25/30] e2fsck: check inline_data in pass2 Zheng Liu
2013-12-06 9:58 ` [PATCH v3 26/30] e2fsck: check inline_data in pass3 Zheng Liu
2013-12-06 9:58 ` [PATCH v3 27/30] tests: change result in f_bad_disconnected_inode Zheng Liu
2013-12-06 9:58 ` [PATCH v3 28/30] mke2fs: enable inline_data feature on ext4dev filesystem Zheng Liu
2013-12-06 9:58 ` [PATCH v3 29/30] libext2fs: export inode cahce creation function Zheng Liu
2013-12-06 9:58 ` [PATCH v3 30/30] libext2fs: add a unit test for inline data Zheng Liu
2013-12-07 1:53 ` [PATCH v3 00/30] e2fsprogs: inline data refinement patch set Darrick J. Wong
2013-12-07 3:43 ` Zheng Liu
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=20131207034502.GB13745@gmail.com \
--to=gnehzuil.liu@gmail.com \
--cc=darrick.wong@oracle.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=wenqing.lz@taobao.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 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.