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 v2 20/28] tune2fs: add inline_data feature in tune2fs
Date: Wed, 4 Dec 2013 13:27:58 +0800 [thread overview]
Message-ID: <20131204052758.GI20409@gmail.com> (raw)
In-Reply-To: <20131204040300.GL9535@birch.djwong.org>
On Tue, Dec 03, 2013 at 08:03:00PM -0800, Darrick J. Wong wrote:
> On Wed, Dec 04, 2013 at 11:55:36AM +0800, Zheng Liu wrote:
> > On Tue, Dec 03, 2013 at 02:29:46PM -0800, Darrick J. Wong wrote:
> > > On Tue, Dec 03, 2013 at 08:11:47PM +0800, Zheng Liu wrote:
> > > > From: Zheng Liu <wenqing.lz@taobao.com>
> > > >
> > > > Inline_data can be enabled without ext_attr. Hence we don't check it.
> > > > As doing in mke2fs we need to check inode size.
> > > >
> > > > Now this feature only can be enabled because we may be out of space when
> > > > disabling it. If this feature is disabled, we need to allocate a block
> > > > for every file and directory, and it might exhaust all space.
> > >
> > > Could we at least try to turn off inlinedata and decline to clear the flag if
> > > we ENOSPC?
> >
> > If we want to turn off inline_data, that means that we need to scan all
> > used inodes and try to expand it. It isn't hard but I am wondering if
> > someone really want to disable this feature. In my opinion, I really
> > want to enable inline_data feature by default when we believe it is very
> > stable because it will benefit for all desktop and Android users.
>
> I guess that really depends on our testers -- on the one hand, I do most of my
> testing with scratch filesystems so on a practical level I will never need the
> ability to "undo" these sorts of things.
>
> On the other hand, there's the argument that more people will test code if they
> think they can go back to the old system if the new one turns out to be a mess.
>
> Same sort of reasoning applies to "why did you implement converting 64bit ->
> 32bit filesystems?" :)
Fair enough. You convince me. :)
- Zheng
>
> --D
> >
> > - Zheng
> >
> > >
> > > (Yes, that's more of a TODO feature request...)
> > >
> > > > Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> > > > Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
> > > > ---
> > > > misc/tune2fs.8.in | 5 +++++
> > > > misc/tune2fs.c | 16 +++++++++++++++-
> > > > 2 files changed, 20 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/misc/tune2fs.8.in b/misc/tune2fs.8.in
> > > > index 55c6dd9..78f965b 100644
> > > > --- a/misc/tune2fs.8.in
> > > > +++ b/misc/tune2fs.8.in
> > > > @@ -531,6 +531,11 @@ Setting the filesystem feature is equivalent to using the
> > > > .B \-j
> > > > option.
> > > > .TP
> > > > +.B inline_data
> > > > +Allow data to be stored in the inode and extented attribute area.
> > >
> > > "extended"
> > >
> > > --D
> > >
> > > > +.B Tune2fs
> > > > +only supports setting this filesystem feature.
> > > > +.TP
> > > > .B large_file
> > > > Filesystem can contain files that are greater than 2GB. (Modern kernels
> > > > set this feature automatically when a file > 2GB is created.)
> > > > diff --git a/misc/tune2fs.c b/misc/tune2fs.c
> > > > index 95c1886..1952081 100644
> > > > --- a/misc/tune2fs.c
> > > > +++ b/misc/tune2fs.c
> > > > @@ -140,7 +140,8 @@ static __u32 ok_features[3] = {
> > > > EXT2_FEATURE_INCOMPAT_FILETYPE |
> > > > EXT3_FEATURE_INCOMPAT_EXTENTS |
> > > > EXT4_FEATURE_INCOMPAT_FLEX_BG |
> > > > - EXT4_FEATURE_INCOMPAT_MMP,
> > > > + EXT4_FEATURE_INCOMPAT_MMP |
> > > > + EXT4_FEATURE_INCOMPAT_INLINE_DATA,
> > > > /* R/O compat */
> > > > EXT2_FEATURE_RO_COMPAT_LARGE_FILE |
> > > > EXT4_FEATURE_RO_COMPAT_HUGE_FILE|
> > > > @@ -1083,6 +1084,19 @@ mmp_error:
> > > > disable_uninit_bg(fs,
> > > > EXT4_FEATURE_RO_COMPAT_GDT_CSUM);
> > > >
> > > > + if (FEATURE_ON(E2P_FEATURE_INCOMPAT,
> > > > + EXT4_FEATURE_INCOMPAT_INLINE_DATA)) {
> > > > + /*
> > > > + * Check inode size. If inode size is 128, tell user that
> > > > + * inline data is useless.
> > > > + */
> > > > + if (EXT2_INODE_SIZE(fs->super) == EXT2_GOOD_OLD_INODE_SIZE) {
> > > > + fputs(_("The inode size is too small to "
> > > > + "store inline data.\n"), stderr);
> > > > + return 1;
> > > > + }
> > > > + }
> > > > +
> > > > if (FEATURE_ON(E2P_FEATURE_RO_INCOMPAT,
> > > > EXT4_FEATURE_RO_COMPAT_QUOTA)) {
> > > > /*
> > > > --
> > > > 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
> > --
> > 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
> --
> 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-04 5:25 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-03 12:11 [PATCH v2 00/28] e2fsprogs: inline data refinement patch set Zheng Liu
2013-12-03 12:11 ` [PATCH v2 01/28] libext2fs: support modifying arbitrary extended attributes Zheng Liu
2013-12-03 19:54 ` Darrick J. Wong
2013-12-04 3:20 ` Zheng Liu
2013-12-04 3:21 ` Darrick J. Wong
2013-12-04 14:53 ` Theodore Ts'o
2013-12-04 20:30 ` Darrick J. Wong
2013-12-04 22:43 ` Theodore Ts'o
2013-12-04 22:55 ` Darrick J. Wong
2013-12-03 12:11 ` [PATCH v2 02/28] libext2fs: various tweaks to the xattr editor APIs Zheng Liu
2013-12-03 12:11 ` [PATCH v2 03/28] libext2fs: extend xattr api to query number of attrs Zheng Liu
2013-12-03 12:11 ` [PATCH v2 04/28] libext2fs: fix memory leaks in extended attribute code Zheng Liu
2013-12-03 12:11 ` [PATCH v2 05/28] libext2fs: fix block leak when releasing xattr block Zheng Liu
2013-12-03 12:11 ` [PATCH v2 06/28] libext2fs: remove redundant code Zheng Liu
2013-12-03 12:11 ` [PATCH v2 07/28] libext2fs: free key/value pairs before reading Zheng Liu
2013-12-03 12:11 ` [PATCH v2 08/28] debugfs: dump all extended attributes Zheng Liu
2013-12-03 12:11 ` [PATCH v2 09/28] libext2fs: handle inline data in dir iterator function Zheng Liu
2013-12-03 22:13 ` Darrick J. Wong
2013-12-04 4:57 ` Zheng Liu
2013-12-04 5:10 ` Darrick J. Wong
2013-12-04 5:26 ` Zheng Liu
2013-12-04 6:07 ` Darrick J. Wong
2013-12-04 6:21 ` Zheng Liu
2013-12-04 7:33 ` Darrick J. Wong
2013-12-03 12:11 ` [PATCH v2 10/28] libext2fs: handle inline_data in block " Zheng Liu
2013-12-03 12:11 ` [PATCH v2 11/28] debugfs: make stat command support inline data Zheng Liu
2013-12-03 12:11 ` [PATCH v2 12/28] debugfs: make expand " Zheng Liu
2013-12-03 21:19 ` Darrick J. Wong
2013-12-04 3:42 ` Zheng Liu
2013-12-03 12:11 ` [PATCH v2 13/28] debugfs: make mkdir " Zheng Liu
2013-12-03 12:11 ` [PATCH v2 14/28] debugfs: make lsdel " Zheng Liu
2013-12-03 12:11 ` [PATCH v2 15/28] debugfs: handle inline_data feature in bmap command Zheng Liu
2013-12-04 3:11 ` Darrick J. Wong
2013-12-04 3:46 ` Zheng Liu
2013-12-03 12:11 ` [PATCH v2 16/28] debugfs: handle inline data feature in punch command Zheng Liu
2013-12-03 12:11 ` [PATCH v2 17/28] libext2fs: handle inline data in read/write function Zheng Liu
2013-12-04 3:02 ` Darrick J. Wong
2013-12-04 3:47 ` Zheng Liu
2013-12-03 12:11 ` [PATCH v2 18/28] libext2fs: add inline_data feature into EXT2_LIB_FEATURE_INCOMPAT_SUPP Zheng Liu
2013-12-03 12:11 ` [PATCH v2 19/28] mke2fs: add inline_data support in mke2fs Zheng Liu
2013-12-03 22:30 ` Darrick J. Wong
2013-12-04 3:27 ` Zheng Liu
2013-12-04 4:08 ` Darrick J. Wong
2013-12-04 5:21 ` Zheng Liu
2013-12-04 5:26 ` Darrick J. Wong
2013-12-04 5:50 ` Zheng Liu
2013-12-04 6:02 ` Darrick J. Wong
2013-12-04 6:18 ` Zheng Liu
2013-12-03 12:11 ` [PATCH v2 20/28] tune2fs: add inline_data feature in tune2fs Zheng Liu
2013-12-03 22:29 ` Darrick J. Wong
2013-12-04 3:55 ` Zheng Liu
2013-12-04 4:03 ` Darrick J. Wong
2013-12-04 5:27 ` Zheng Liu [this message]
2013-12-03 12:11 ` [PATCH v2 21/28] e2fsck: add problem descriptions and check inline data feature Zheng Liu
2013-12-03 12:11 ` [PATCH v2 22/28] e2fsck: check inline_data in pass1 Zheng Liu
2013-12-03 12:11 ` [PATCH v2 23/28] e2fsck: check inline_data in pass2 Zheng Liu
2013-12-03 12:11 ` [PATCH v2 24/28] e2fsck: check inline_data in pass3 Zheng Liu
2013-12-03 12:11 ` [PATCH v2 25/28] tests: change result in f_bad_disconnected_inode Zheng Liu
2013-12-03 12:11 ` [PATCH v2 26/28] mke2fs: enable inline_data feature on ext4dev filesystem Zheng Liu
2013-12-03 12:11 ` [PATCH v2 27/28] libext2fs: export inode cahce creation function Zheng Liu
2013-12-03 22:22 ` Darrick J. Wong
2013-12-04 3:56 ` Zheng Liu
2013-12-03 12:11 ` [PATCH v2 28/28] libext2fs: add a unit test for inline data 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=20131204052758.GI20409@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.