Discussion:
[Samba] Read offline attribute
David Disseldorp
2014-06-10 15:32:50 UTC
Permalink
Hi Peter,
I want to read the 'offline' extended attribute on files on a windows
share mounted on a linux host, is it possible to get this info?
The Linux CIFS client doesn't currently offer such support. However,
the offline attribute can be checked using smbclient via the allinfo
command. Offline files will carry an 'O' in the attributes field.

Cheers, David
Steve French
2014-06-10 16:26:44 UTC
Permalink
This would be VERY trivial to add - the intent was to allow a query of
the CIFS/SMB3 specific inode metatada via a user xattr (the attribute
was defined as user.DosAttrib). Probably less than 10 lines of code
to finishup below the following in fs/cifs/xattr.c

if (strncmp(ea_name, CIFS_XATTR_DOS_ATTRIB, 14) == 0) {
cifs_dbg(FYI, "attempt to query cifs inode metadata\n");
/* revalidate/getattr then populate from inode */
Post by David Disseldorp
Hi Peter,
I want to read the 'offline' extended attribute on files on a windows
share mounted on a linux host, is it possible to get this info?
The Linux CIFS client doesn't currently offer such support. However,
the offline attribute can be checked using smbclient via the allinfo
command. Offline files will carry an 'O' in the attributes field.
Cheers, David
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Thanks,

Steve
Peter Flood
2014-06-11 11:33:25 UTC
Permalink
Hi Steve

Trivial is great, it would be a useful addition.
Post by Steve French
This would be VERY trivial to add - the intent was to allow a query of
the CIFS/SMB3 specific inode metatada via a user xattr (the attribute
was defined as user.DosAttrib). Probably less than 10 lines of code
to finishup below the following in fs/cifs/xattr.c
if (strncmp(ea_name, CIFS_XATTR_DOS_ATTRIB, 14) == 0) {
cifs_dbg(FYI, "attempt to query cifs inode metadata\n");
/* revalidate/getattr then populate from inode */
Post by David Disseldorp
Hi Peter,
I want to read the 'offline' extended attribute on files on a windows
share mounted on a linux host, is it possible to get this info?
The Linux CIFS client doesn't currently offer such support. However,
the offline attribute can be checked using smbclient via the allinfo
command. Offline files will carry an 'O' in the attributes field.
Cheers, David
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
Peter Flood
2014-06-11 10:20:59 UTC
Permalink
Hi David

Thanks, works.

Peter
Post by David Disseldorp
Hi Peter,
I want to read the 'offline' extended attribute on files on a windows
share mounted on a linux host, is it possible to get this info?
The Linux CIFS client doesn't currently offer such support. However,
the offline attribute can be checked using smbclient via the allinfo
command. Offline files will carry an 'O' in the attributes field.
Cheers, David
Loading...