linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Elsayed <eternaleye-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org
Subject: Re: New file attribute for integrity
Date: Mon, 01 Jul 2013 13:07:51 -0700	[thread overview]
Message-ID: <kqsnii$u6h$1@ger.gmane.org> (raw)
In-Reply-To: CAH2r5mtvDv80R00QONf3WadSRASk9w46uju04oQB67mWrnWQVg@mail.gmail.com

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. 

      reply	other threads:[~2013-07-01 20:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-01 19:59 New file attribute for integrity Steve French
2013-07-01 20:07 ` Alex Elsayed [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='kqsnii$u6h$1@ger.gmane.org' \
    --to=eternaleye-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).