Skip to contentSkip to conversation

Read offline attribute

Samba David Disseldorp 3 participants 4 messages Jun 10, 2014 – Jun 11, 2014 5 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Hi Peter,

Quoted 2 lines · Peter Flood

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

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 */

Quoted 16 lines · David Disseldorp

Hi Peter,

Quoted 2 lines · Peter Flood

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 the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 3 lines
Thanks,

Steve

A message that is not in the archive (sent off-list or not yet received): CAH2r5mvoE8-Pu+Bx0sAN9eweodfun1x2bXDEme9gaYqLY3Umww-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#7 lore raw

Hi Steve

Trivial is great, it would be a useful addition.

Quoted 27 lines · 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 */

Quoted 15 lines · David Disseldorp

Hi Peter,

Quoted 2 lines · Peter Flood

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 the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#8 lore raw
In reply to a message not in the archive

Hi David

Thanks, works.

Peter

Quoted 11 lines · David Disseldorp

Hi Peter,

Quoted 2 lines · Peter Flood

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