* [PATCH] xfs_io/lsattr: expose FS_XFLAG_HASATTR flag
@ 2019-11-06 5:58 Amir Goldstein
2019-11-06 16:01 ` Darrick J. Wong
2019-11-08 6:50 ` Darrick J. Wong
0 siblings, 2 replies; 9+ messages in thread
From: Amir Goldstein @ 2019-11-06 5:58 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Darrick J . Wong, linux-xfs
For efficient check if file has xattrs.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
io/attr.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/io/attr.c b/io/attr.c
index b713d017..ba88ef16 100644
--- a/io/attr.c
+++ b/io/attr.c
@@ -37,6 +37,7 @@ static struct xflags {
{ FS_XFLAG_FILESTREAM, "S", "filestream" },
{ FS_XFLAG_DAX, "x", "dax" },
{ FS_XFLAG_COWEXTSIZE, "C", "cowextsize" },
+ { FS_XFLAG_HASATTR, "X", "has-xattr" },
{ 0, NULL, NULL }
};
#define CHATTR_XFLAG_LIST "r"/*p*/"iasAdtPneEfSxC"
@@ -65,6 +66,7 @@ lsattr_help(void)
" S -- enable filestreams allocator for this directory\n"
" x -- Use direct access (DAX) for data in this file\n"
" C -- for files with shared blocks, observe the inode CoW extent size value\n"
+" X -- file has extended attributes (cannot be changed using chattr)\n"
"\n"
" Options:\n"
" -R -- recursively descend (useful when current file is a directory)\n"
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] xfs_io/lsattr: expose FS_XFLAG_HASATTR flag
2019-11-06 5:58 [PATCH] xfs_io/lsattr: expose FS_XFLAG_HASATTR flag Amir Goldstein
@ 2019-11-06 16:01 ` Darrick J. Wong
2019-11-06 18:29 ` Amir Goldstein
2019-11-08 6:50 ` Darrick J. Wong
1 sibling, 1 reply; 9+ messages in thread
From: Darrick J. Wong @ 2019-11-06 16:01 UTC (permalink / raw)
To: Amir Goldstein; +Cc: Eric Sandeen, linux-xfs
On Wed, Nov 06, 2019 at 07:58:55AM +0200, Amir Goldstein wrote:
> For efficient check if file has xattrs.
>
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> ---
> io/attr.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/io/attr.c b/io/attr.c
> index b713d017..ba88ef16 100644
> --- a/io/attr.c
> +++ b/io/attr.c
> @@ -37,6 +37,7 @@ static struct xflags {
> { FS_XFLAG_FILESTREAM, "S", "filestream" },
> { FS_XFLAG_DAX, "x", "dax" },
> { FS_XFLAG_COWEXTSIZE, "C", "cowextsize" },
> + { FS_XFLAG_HASATTR, "X", "has-xattr" },
> { 0, NULL, NULL }
> };
> #define CHATTR_XFLAG_LIST "r"/*p*/"iasAdtPneEfSxC"
/me wonders if this should have /*X*/ commented out the same way we do
for "p".
Otherwise, the patch looks ok to me...
/me *also* wonders how many filesystems fail to implement this flag but
support xattrs.
Oh. All of them. Though I assume overlayfs is being patched... :)
--D
> @@ -65,6 +66,7 @@ lsattr_help(void)
> " S -- enable filestreams allocator for this directory\n"
> " x -- Use direct access (DAX) for data in this file\n"
> " C -- for files with shared blocks, observe the inode CoW extent size value\n"
> +" X -- file has extended attributes (cannot be changed using chattr)\n"
> "\n"
> " Options:\n"
> " -R -- recursively descend (useful when current file is a directory)\n"
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] xfs_io/lsattr: expose FS_XFLAG_HASATTR flag
2019-11-06 16:01 ` Darrick J. Wong
@ 2019-11-06 18:29 ` Amir Goldstein
2019-11-06 18:45 ` Eric Sandeen
0 siblings, 1 reply; 9+ messages in thread
From: Amir Goldstein @ 2019-11-06 18:29 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Eric Sandeen, linux-xfs
On Wed, Nov 6, 2019 at 6:03 PM Darrick J. Wong <darrick.wong@oracle.com> wrote:
>
> On Wed, Nov 06, 2019 at 07:58:55AM +0200, Amir Goldstein wrote:
> > For efficient check if file has xattrs.
> >
> > Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> > ---
> > io/attr.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/io/attr.c b/io/attr.c
> > index b713d017..ba88ef16 100644
> > --- a/io/attr.c
> > +++ b/io/attr.c
> > @@ -37,6 +37,7 @@ static struct xflags {
> > { FS_XFLAG_FILESTREAM, "S", "filestream" },
> > { FS_XFLAG_DAX, "x", "dax" },
> > { FS_XFLAG_COWEXTSIZE, "C", "cowextsize" },
> > + { FS_XFLAG_HASATTR, "X", "has-xattr" },
> > { 0, NULL, NULL }
> > };
> > #define CHATTR_XFLAG_LIST "r"/*p*/"iasAdtPneEfSxC"
>
> /me wonders if this should have /*X*/ commented out the same way we do
> for "p".
Sure. Eric, please let me know if you want a re-submit for this.
>
> Otherwise, the patch looks ok to me...
>
> /me *also* wonders how many filesystems fail to implement this flag but
> support xattrs.
>
> Oh. All of them. Though I assume overlayfs is being patched... :)
>
It doesn't need to be patched. It doesn't have xattr storage of its own.
The ioctl is passed down to the underlying fs (*).
(*) The ioctl is currently blocked on overlayfs directories.
Thanks,
Amir.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] xfs_io/lsattr: expose FS_XFLAG_HASATTR flag
2019-11-06 18:29 ` Amir Goldstein
@ 2019-11-06 18:45 ` Eric Sandeen
2019-11-06 18:52 ` Darrick J. Wong
0 siblings, 1 reply; 9+ messages in thread
From: Eric Sandeen @ 2019-11-06 18:45 UTC (permalink / raw)
To: Amir Goldstein, Darrick J. Wong; +Cc: linux-xfs
On 11/6/19 12:29 PM, Amir Goldstein wrote:
> On Wed, Nov 6, 2019 at 6:03 PM Darrick J. Wong <darrick.wong@oracle.com> wrote:
>>
>> On Wed, Nov 06, 2019 at 07:58:55AM +0200, Amir Goldstein wrote:
>>> For efficient check if file has xattrs.
>>>
>>> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
>>> ---
>>> io/attr.c | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff --git a/io/attr.c b/io/attr.c
>>> index b713d017..ba88ef16 100644
>>> --- a/io/attr.c
>>> +++ b/io/attr.c
>>> @@ -37,6 +37,7 @@ static struct xflags {
>>> { FS_XFLAG_FILESTREAM, "S", "filestream" },
>>> { FS_XFLAG_DAX, "x", "dax" },
>>> { FS_XFLAG_COWEXTSIZE, "C", "cowextsize" },
>>> + { FS_XFLAG_HASATTR, "X", "has-xattr" },
>>> { 0, NULL, NULL }
>>> };
>>> #define CHATTR_XFLAG_LIST "r"/*p*/"iasAdtPneEfSxC"
>>
>> /me wonders if this should have /*X*/ commented out the same way we do
>> for "p".
>
> Sure. Eric, please let me know if you want a re-submit for this.
Ummm I'll just stage it now and add it so I don't forget
like:
#define CHATTR_XFLAG_LIST "r"/*p*/"iasAdtPneEfS"/*X*/"xC"
that, right?
>>
>> Otherwise, the patch looks ok to me...
>>
>> /me *also* wonders how many filesystems fail to implement this flag but
>> support xattrs.
>>
>> Oh. All of them. Though I assume overlayfs is being patched... :)
>>
>
> It doesn't need to be patched. It doesn't have xattr storage of its own.
> The ioctl is passed down to the underlying fs (*).
> (*) The ioctl is currently blocked on overlayfs directories.
>
> Thanks,
> Amir.
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] xfs_io/lsattr: expose FS_XFLAG_HASATTR flag
2019-11-06 18:45 ` Eric Sandeen
@ 2019-11-06 18:52 ` Darrick J. Wong
2019-11-06 18:53 ` Eric Sandeen
0 siblings, 1 reply; 9+ messages in thread
From: Darrick J. Wong @ 2019-11-06 18:52 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Amir Goldstein, linux-xfs
On Wed, Nov 06, 2019 at 12:45:55PM -0600, Eric Sandeen wrote:
> On 11/6/19 12:29 PM, Amir Goldstein wrote:
> > On Wed, Nov 6, 2019 at 6:03 PM Darrick J. Wong <darrick.wong@oracle.com> wrote:
> >>
> >> On Wed, Nov 06, 2019 at 07:58:55AM +0200, Amir Goldstein wrote:
> >>> For efficient check if file has xattrs.
> >>>
> >>> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> >>> ---
> >>> io/attr.c | 2 ++
> >>> 1 file changed, 2 insertions(+)
> >>>
> >>> diff --git a/io/attr.c b/io/attr.c
> >>> index b713d017..ba88ef16 100644
> >>> --- a/io/attr.c
> >>> +++ b/io/attr.c
> >>> @@ -37,6 +37,7 @@ static struct xflags {
> >>> { FS_XFLAG_FILESTREAM, "S", "filestream" },
> >>> { FS_XFLAG_DAX, "x", "dax" },
> >>> { FS_XFLAG_COWEXTSIZE, "C", "cowextsize" },
> >>> + { FS_XFLAG_HASATTR, "X", "has-xattr" },
> >>> { 0, NULL, NULL }
> >>> };
> >>> #define CHATTR_XFLAG_LIST "r"/*p*/"iasAdtPneEfSxC"
> >>
> >> /me wonders if this should have /*X*/ commented out the same way we do
> >> for "p".
> >
> > Sure. Eric, please let me know if you want a re-submit for this.
>
> Ummm I'll just stage it now and add it so I don't forget
>
> like:
>
> #define CHATTR_XFLAG_LIST "r"/*p*/"iasAdtPneEfS"/*X*/"xC"
>
> that, right?
Right.
--D
> >>
> >> Otherwise, the patch looks ok to me...
> >>
> >> /me *also* wonders how many filesystems fail to implement this flag but
> >> support xattrs.
> >>
> >> Oh. All of them. Though I assume overlayfs is being patched... :)
> >>
> >
> > It doesn't need to be patched. It doesn't have xattr storage of its own.
> > The ioctl is passed down to the underlying fs (*).
> > (*) The ioctl is currently blocked on overlayfs directories.
> >
> > Thanks,
> > Amir.
> >
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] xfs_io/lsattr: expose FS_XFLAG_HASATTR flag
2019-11-06 18:52 ` Darrick J. Wong
@ 2019-11-06 18:53 ` Eric Sandeen
2019-11-06 19:07 ` Darrick J. Wong
0 siblings, 1 reply; 9+ messages in thread
From: Eric Sandeen @ 2019-11-06 18:53 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Amir Goldstein, linux-xfs
On 11/6/19 12:52 PM, Darrick J. Wong wrote:
> On Wed, Nov 06, 2019 at 12:45:55PM -0600, Eric Sandeen wrote:
>> On 11/6/19 12:29 PM, Amir Goldstein wrote:
>>>>> #define CHATTR_XFLAG_LIST "r"/*p*/"iasAdtPneEfSxC"
>>>>
>>>> /me wonders if this should have /*X*/ commented out the same way we do
>>>> for "p".
>>>
>>> Sure. Eric, please let me know if you want a re-submit for this.
>>
>> Ummm I'll just stage it now and add it so I don't forget
>>
>> like:
>>
>> #define CHATTR_XFLAG_LIST "r"/*p*/"iasAdtPneEfS"/*X*/"xC"
>>
>> that, right?
>
> Right.
Actually for consistent ordering w/ the array, I guess maybe
#define CHATTR_XFLAG_LIST "r"/*p*/"iasAdtPneEfSxC"/*X*/
Thanks
-Eric
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] xfs_io/lsattr: expose FS_XFLAG_HASATTR flag
2019-11-06 18:53 ` Eric Sandeen
@ 2019-11-06 19:07 ` Darrick J. Wong
0 siblings, 0 replies; 9+ messages in thread
From: Darrick J. Wong @ 2019-11-06 19:07 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Amir Goldstein, linux-xfs
On Wed, Nov 06, 2019 at 12:53:46PM -0600, Eric Sandeen wrote:
>
>
> On 11/6/19 12:52 PM, Darrick J. Wong wrote:
> > On Wed, Nov 06, 2019 at 12:45:55PM -0600, Eric Sandeen wrote:
> >> On 11/6/19 12:29 PM, Amir Goldstein wrote:
>
> >>>>> #define CHATTR_XFLAG_LIST "r"/*p*/"iasAdtPneEfSxC"
> >>>>
> >>>> /me wonders if this should have /*X*/ commented out the same way we do
> >>>> for "p".
> >>>
> >>> Sure. Eric, please let me know if you want a re-submit for this.
> >>
> >> Ummm I'll just stage it now and add it so I don't forget
> >>
> >> like:
> >>
> >> #define CHATTR_XFLAG_LIST "r"/*p*/"iasAdtPneEfS"/*X*/"xC"
> >>
> >> that, right?
> >
> > Right.
>
>
> Actually for consistent ordering w/ the array, I guess maybe
>
> #define CHATTR_XFLAG_LIST "r"/*p*/"iasAdtPneEfSxC"/*X*/
Sure. /me is done beating this hoss.
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> Thanks
>
> -Eric
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] xfs_io/lsattr: expose FS_XFLAG_HASATTR flag
2019-11-06 5:58 [PATCH] xfs_io/lsattr: expose FS_XFLAG_HASATTR flag Amir Goldstein
2019-11-06 16:01 ` Darrick J. Wong
@ 2019-11-08 6:50 ` Darrick J. Wong
2019-11-08 13:39 ` Eric Sandeen
1 sibling, 1 reply; 9+ messages in thread
From: Darrick J. Wong @ 2019-11-08 6:50 UTC (permalink / raw)
To: Amir Goldstein; +Cc: Eric Sandeen, linux-xfs
On Wed, Nov 06, 2019 at 07:58:55AM +0200, Amir Goldstein wrote:
> For efficient check if file has xattrs.
>
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> ---
> io/attr.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/io/attr.c b/io/attr.c
> index b713d017..ba88ef16 100644
> --- a/io/attr.c
> +++ b/io/attr.c
> @@ -37,6 +37,7 @@ static struct xflags {
> { FS_XFLAG_FILESTREAM, "S", "filestream" },
> { FS_XFLAG_DAX, "x", "dax" },
> { FS_XFLAG_COWEXTSIZE, "C", "cowextsize" },
> + { FS_XFLAG_HASATTR, "X", "has-xattr" },
This causes an xfs/207 regression on the extra letter in the output; can
you please fix that?
--D
> { 0, NULL, NULL }
> };
> #define CHATTR_XFLAG_LIST "r"/*p*/"iasAdtPneEfSxC"
> @@ -65,6 +66,7 @@ lsattr_help(void)
> " S -- enable filestreams allocator for this directory\n"
> " x -- Use direct access (DAX) for data in this file\n"
> " C -- for files with shared blocks, observe the inode CoW extent size value\n"
> +" X -- file has extended attributes (cannot be changed using chattr)\n"
> "\n"
> " Options:\n"
> " -R -- recursively descend (useful when current file is a directory)\n"
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] xfs_io/lsattr: expose FS_XFLAG_HASATTR flag
2019-11-08 6:50 ` Darrick J. Wong
@ 2019-11-08 13:39 ` Eric Sandeen
0 siblings, 0 replies; 9+ messages in thread
From: Eric Sandeen @ 2019-11-08 13:39 UTC (permalink / raw)
To: Darrick J. Wong, Amir Goldstein; +Cc: linux-xfs
On 11/8/19 12:50 AM, Darrick J. Wong wrote:
> On Wed, Nov 06, 2019 at 07:58:55AM +0200, Amir Goldstein wrote:
>> For efficient check if file has xattrs.
>>
>> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
>> ---
>> io/attr.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/io/attr.c b/io/attr.c
>> index b713d017..ba88ef16 100644
>> --- a/io/attr.c
>> +++ b/io/attr.c
>> @@ -37,6 +37,7 @@ static struct xflags {
>> { FS_XFLAG_FILESTREAM, "S", "filestream" },
>> { FS_XFLAG_DAX, "x", "dax" },
>> { FS_XFLAG_COWEXTSIZE, "C", "cowextsize" },
>> + { FS_XFLAG_HASATTR, "X", "has-xattr" },
>
> This causes an xfs/207 regression on the extra letter in the output; can
> you please fix that?
I sent [PATCH] xfs/207: explicitly test for xflag character
but forgot to cc xfs list. it's on the fstests list, sorry!
-Eric
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-11-08 13:39 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06 5:58 [PATCH] xfs_io/lsattr: expose FS_XFLAG_HASATTR flag Amir Goldstein
2019-11-06 16:01 ` Darrick J. Wong
2019-11-06 18:29 ` Amir Goldstein
2019-11-06 18:45 ` Eric Sandeen
2019-11-06 18:52 ` Darrick J. Wong
2019-11-06 18:53 ` Eric Sandeen
2019-11-06 19:07 ` Darrick J. Wong
2019-11-08 6:50 ` Darrick J. Wong
2019-11-08 13:39 ` Eric Sandeen
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.