All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext4: make huge file flag user visible.
@ 2018-01-24  4:15 Tyson Nottingham
  2018-01-24  5:03 ` Darrick J. Wong
  0 siblings, 1 reply; 6+ messages in thread
From: Tyson Nottingham @ 2018-01-24  4:15 UTC (permalink / raw)
  To: linux-ext4; +Cc: tytso, adilger.kernel, Tyson Nottingham

Make huge file flag visible to clients of FS_IOC_GETFLAGS ioctl, e.g.
the userspace tool lsattr, which expects the flag to be visible.

Signed-off-by: Tyson Nottingham <tgnottingham@gmail.com>
---
 fs/ext4/ext4.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 3241475..dbd6318 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -400,7 +400,7 @@ struct flex_groups {
 #define EXT4_PROJINHERIT_FL		0x20000000 /* Create with parents projid */
 #define EXT4_RESERVED_FL		0x80000000 /* reserved for ext4 lib */
 
-#define EXT4_FL_USER_VISIBLE		0x304BDFFF /* User visible flags */
+#define EXT4_FL_USER_VISIBLE		0x304FDFFF /* User visible flags */
 #define EXT4_FL_USER_MODIFIABLE		0x204BC0FF /* User modifiable flags */
 
 /* Flags we can manipulate with through EXT4_IOC_FSSETXATTR */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ext4: make huge file flag user visible.
  2018-01-24  4:15 [PATCH] ext4: make huge file flag user visible Tyson Nottingham
@ 2018-01-24  5:03 ` Darrick J. Wong
  2018-01-24  5:09   ` Darrick J. Wong
  0 siblings, 1 reply; 6+ messages in thread
From: Darrick J. Wong @ 2018-01-24  5:03 UTC (permalink / raw)
  To: Tyson Nottingham; +Cc: linux-ext4, tytso, adilger.kernel

On Tue, Jan 23, 2018 at 08:15:48PM -0800, Tyson Nottingham wrote:
> Make huge file flag visible to clients of FS_IOC_GETFLAGS ioctl, e.g.
> the userspace tool lsattr, which expects the flag to be visible.

Pardon my asking, but why is this necessary?  Are there
userspace-visible effects of this flag?

--D

> 
> Signed-off-by: Tyson Nottingham <tgnottingham@gmail.com>
> ---
>  fs/ext4/ext4.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> index 3241475..dbd6318 100644
> --- a/fs/ext4/ext4.h
> +++ b/fs/ext4/ext4.h
> @@ -400,7 +400,7 @@ struct flex_groups {
>  #define EXT4_PROJINHERIT_FL		0x20000000 /* Create with parents projid */
>  #define EXT4_RESERVED_FL		0x80000000 /* reserved for ext4 lib */
>  
> -#define EXT4_FL_USER_VISIBLE		0x304BDFFF /* User visible flags */
> +#define EXT4_FL_USER_VISIBLE		0x304FDFFF /* User visible flags */
>  #define EXT4_FL_USER_MODIFIABLE		0x204BC0FF /* User modifiable flags */
>  
>  /* Flags we can manipulate with through EXT4_IOC_FSSETXATTR */
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ext4: make huge file flag user visible.
  2018-01-24  5:03 ` Darrick J. Wong
@ 2018-01-24  5:09   ` Darrick J. Wong
  2018-01-25  7:48     ` Tyson Nottingham
  0 siblings, 1 reply; 6+ messages in thread
From: Darrick J. Wong @ 2018-01-24  5:09 UTC (permalink / raw)
  To: Tyson Nottingham; +Cc: linux-ext4, tytso, adilger.kernel

On Tue, Jan 23, 2018 at 09:03:33PM -0800, Darrick J. Wong wrote:
> On Tue, Jan 23, 2018 at 08:15:48PM -0800, Tyson Nottingham wrote:
> > Make huge file flag visible to clients of FS_IOC_GETFLAGS ioctl, e.g.
> > the userspace tool lsattr, which expects the flag to be visible.
> 
> Pardon my asking, but why is this necessary?  Are there
> userspace-visible effects of this flag?

Ahh, the chattr man page says that 'h' means HUGE_FILE_FL, but I guess
ext4 won't report it to userspace...?

<shrug> XFS won't either, maybe we just kill the 'h' option? :)

--D

> 
> --D
> 
> > 
> > Signed-off-by: Tyson Nottingham <tgnottingham@gmail.com>
> > ---
> >  fs/ext4/ext4.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> > index 3241475..dbd6318 100644
> > --- a/fs/ext4/ext4.h
> > +++ b/fs/ext4/ext4.h
> > @@ -400,7 +400,7 @@ struct flex_groups {
> >  #define EXT4_PROJINHERIT_FL		0x20000000 /* Create with parents projid */
> >  #define EXT4_RESERVED_FL		0x80000000 /* reserved for ext4 lib */
> >  
> > -#define EXT4_FL_USER_VISIBLE		0x304BDFFF /* User visible flags */
> > +#define EXT4_FL_USER_VISIBLE		0x304FDFFF /* User visible flags */
> >  #define EXT4_FL_USER_MODIFIABLE		0x204BC0FF /* User modifiable flags */
> >  
> >  /* Flags we can manipulate with through EXT4_IOC_FSSETXATTR */
> > -- 
> > 2.7.4
> > 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ext4: make huge file flag user visible.
  2018-01-24  5:09   ` Darrick J. Wong
@ 2018-01-25  7:48     ` Tyson Nottingham
  2018-01-29 23:08       ` Darrick J. Wong
  0 siblings, 1 reply; 6+ messages in thread
From: Tyson Nottingham @ 2018-01-25  7:48 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-ext4, tytso, adilger.kernel

On Tue, Jan 23, 2018 at 09:09:30PM -0800, Darrick J. Wong wrote:

> > Pardon my asking, but why is this necessary?  Are there
> > userspace-visible effects of this flag?
> 
> Ahh, the chattr man page says that 'h' means HUGE_FILE_FL, but I guess
> ext4 won't report it to userspace...?
> 
> <shrug> XFS won't either, maybe we just kill the 'h' option? :)

Thanks for responses. Yes, I was just trying to make ext4 consistent with the
man page. Since apparently the flag was intended to be user visible at some
point, I thought it would be fine to make it so. As you said, removing it from
chattr/lsattr is another option. I'll do whatever I'm told. :)

Tyson

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ext4: make huge file flag user visible.
  2018-01-25  7:48     ` Tyson Nottingham
@ 2018-01-29 23:08       ` Darrick J. Wong
  2018-02-05 22:29         ` Tyson Nottingham
  0 siblings, 1 reply; 6+ messages in thread
From: Darrick J. Wong @ 2018-01-29 23:08 UTC (permalink / raw)
  To: Tyson Nottingham; +Cc: linux-ext4, tytso, adilger.kernel

On Wed, Jan 24, 2018 at 11:48:14PM -0800, Tyson Nottingham wrote:
> On Tue, Jan 23, 2018 at 09:09:30PM -0800, Darrick J. Wong wrote:
> 
> > > Pardon my asking, but why is this necessary?  Are there
> > > userspace-visible effects of this flag?
> > 
> > Ahh, the chattr man page says that 'h' means HUGE_FILE_FL, but I guess
> > ext4 won't report it to userspace...?
> > 
> > <shrug> XFS won't either, maybe we just kill the 'h' option? :)
> 
> Thanks for responses. Yes, I was just trying to make ext4 consistent with the
> man page. Since apparently the flag was intended to be user visible at some
> point, I thought it would be fine to make it so. As you said, removing it from
> chattr/lsattr is another option. I'll do whatever I'm told. :)

Ted hasn't replied in a couple of days, but I would surmise from digging
in the ext4 code that we've never exposed the huge file flag to
userspace, so it'd probably be better to withdraw the documentation/code
of the 'h' option from the chattr manpage instead.  ext2/ext3 never had
such a flag at all, so it's unlikely to break anything.

--D

> Tyson

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ext4: make huge file flag user visible.
  2018-01-29 23:08       ` Darrick J. Wong
@ 2018-02-05 22:29         ` Tyson Nottingham
  0 siblings, 0 replies; 6+ messages in thread
From: Tyson Nottingham @ 2018-02-05 22:29 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-ext4, tytso, adilger.kernel

On Mon, Jan 29, 2018 at 03:08:16PM -0800, Darrick J. Wong wrote:

> Ted hasn't replied in a couple of days, but I would surmise from digging
> in the ext4 code that we've never exposed the huge file flag to
> userspace, so it'd probably be better to withdraw the documentation/code
> of the 'h' option from the chattr manpage instead.  ext2/ext3 never had
> such a flag at all, so it's unlikely to break anything.

I agree. I'll update my existing patch that makes some updates to the chattr
man page.

Thanks,
Tyson

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-05 22:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-24  4:15 [PATCH] ext4: make huge file flag user visible Tyson Nottingham
2018-01-24  5:03 ` Darrick J. Wong
2018-01-24  5:09   ` Darrick J. Wong
2018-01-25  7:48     ` Tyson Nottingham
2018-01-29 23:08       ` Darrick J. Wong
2018-02-05 22:29         ` Tyson Nottingham

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.