All of lore.kernel.org
 help / color / mirror / Atom feed
* New file attribute for integrity
@ 2013-07-01 19:59 Steve French
  2013-07-01 20:07 ` Alex Elsayed
  0 siblings, 1 reply; 2+ messages in thread
From: Steve French @ 2013-07-01 19:59 UTC (permalink / raw)
  To: linux-fsdevel, linux-cifs-u79uwXL29TY76Z2rM5mHXA, samba-technical

At the SMB3 test events over the last two weeks, we found out about a
new file attribute which Windows servers can return
"FILE_ATTRIBUTE_INTEGRITY_STREAM" (it can also be returned as an
fsinfo, volume, property - not just as a file attribute).

The flag is set by the server in responses to query information about
a file when the underlying file system does checksumming of the data
and metadata for the file (similarly if the volume always checksums
data and metadata this flag would be enabled on the fsinfo response).
 Apparently REFS when run in certain configurations (mirrored drives?)
or when formatted to require metadata/data integrity checksumming can
provide these extra guarantees.

btrfs seems to support both metadata and data checksumming by default
and presumably if "check_int" is compiled in and enabled this is the
equivalent.  What should Samba server use to check if data and
metadata integrity checksumming is enabled in btrfs?  Are there any
other in-kernel filesystems that support metadata/data integrity
checksumming and how would Samba server detect them.

SMB3 allows you (the app running on the client) to individually ask
the server's filesystem to enable or disable (metadata and data)
integrity checking on a directory or file - I don't know of any
equivalent on btrfs or any Linux file system.  Is there an example of
a Linux file system that lets you set this on per file or directory
basis?

-- 
Thanks,

Steve

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

* Re: New file attribute for integrity
  2013-07-01 19:59 New file attribute for integrity Steve French
@ 2013-07-01 20:07 ` Alex Elsayed
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Elsayed @ 2013-07-01 20:07 UTC (permalink / raw)
  To: linux-cifs-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA,
	samba-technical-w/Ol4Ecudpl8XjKLYN78aQ

Steve French wrote:

> At the SMB3 test events over the last two weeks, we found out about a
> new file attribute which Windows servers can return
> "FILE_ATTRIBUTE_INTEGRITY_STREAM" (it can also be returned as an
> fsinfo, volume, property - not just as a file attribute).
> 
> The flag is set by the server in responses to query information about
> a file when the underlying file system does checksumming of the data
> and metadata for the file (similarly if the volume always checksums
> data and metadata this flag would be enabled on the fsinfo response).
>  Apparently REFS when run in certain configurations (mirrored drives?)
> or when formatted to require metadata/data integrity checksumming can
> provide these extra guarantees.
> 
> btrfs seems to support both metadata and data checksumming by default
> and presumably if "check_int" is compiled in and enabled this is the
> equivalent.  What should Samba server use to check if data and
> metadata integrity checksumming is enabled in btrfs?  Are there any
> other in-kernel filesystems that support metadata/data integrity
> checksumming and how would Samba server detect them.
> 
> SMB3 allows you (the app running on the client) to individually ask
> the server's filesystem to enable or disable (metadata and data)
> integrity checking on a directory or file - I don't know of any
> equivalent on btrfs or any Linux file system.  Is there an example of
> a Linux file system that lets you set this on per file or directory
> basis?
> 

If I'm remembering correctly, btrfs does permit setting the 'nodatasum' 
option per-file, but doesn't expose that to userspace at this time. It 
*does* expose nodatacow (which implies nodatasum) via chattr +C (capital c), 
but that has some limitations.

>From chattr man page: For btrfs, the 'C' flag should be set on new or empty 
files. If it is set on a file which already has data blocks, it is undefined 
when the blocks assigned to the file will be fully stable. If the 'C' flag 
is set on a directory, it will have no effect on the directory, but new 
files created in that directory will have the No_COW attribute. 

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

end of thread, other threads:[~2013-07-01 20:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-01 19:59 New file attribute for integrity Steve French
2013-07-01 20:07 ` Alex Elsayed

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.