Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
To: Mark Harmstone <mark@harmstone.com>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Cc: "viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"pali@kernel.org" <pali@kernel.org>,
	"dsterba@suse.cz" <dsterba@suse.cz>,
	"aaptel@suse.com" <aaptel@suse.com>,
	"willy@infradead.org" <willy@infradead.org>,
	"rdunlap@infradead.org" <rdunlap@infradead.org>,
	"joe@perches.com" <joe@perches.com>,
	"nborisov@suse.com" <nborisov@suse.com>
Subject: RE: [PATCH v6 05/10] fs/ntfs3: Add attrib operations
Date: Fri, 25 Sep 2020 16:12:06 +0000	[thread overview]
Message-ID: <779cf3a270d2426b9da1bce6b1801ccc@paragon-software.com> (raw)
In-Reply-To: <fd0d9b84-8018-3f6d-0b3d-03c35b1db7f2@harmstone.com>

From: Mark Harmstone <mark.harmstone@gmail.com> On Behalf Of Mark Harmstone
Sent: Friday, September 18, 2020 9:28 PM
> 
> Could I suggest that system.ntfs_security be renamed to security.NTACL? That's
> what WinBtrfs uses, and it means you'd be able to create a working Btrfs copy
> of a Windows installation just by using rsync. IIRC Samba also understands
> xattrs called security.NTACL, when you've put it in the right mode.
> 
> Quite apart from anything else, it's an NT security descriptor, not specifically
> NTFS - I'm fairly sure ReFS uses the same format (for what it's worth).
> 

Hi Mark! Seems reasonable. Will be changed in V8.

> On 18/9/20 5:21 pm, Konstantin Komarov wrote:
> > This adds attrib operations
> >
> > Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
> > ---
> >  fs/ntfs3/attrib.c   | 1312 +++++++++++++++++++++++++++++++++++++++++++
> >  fs/ntfs3/attrlist.c |  462 +++++++++++++++
> >  fs/ntfs3/xattr.c    | 1041 ++++++++++++++++++++++++++++++++++
> >  3 files changed, 2815 insertions(+)
> >  create mode 100644 fs/ntfs3/attrib.c
> >  create mode 100644 fs/ntfs3/attrlist.c
> >  create mode 100644 fs/ntfs3/xattr.c
[]
> > +	if (err < 0)
> > +		goto out1;
> > +	if (!err) {
> > +		posix_acl_release(acl);
> > +		acl = NULL;
> > +	}
> > +
> > +	if (!S_ISDIR(inode->i_mode)) {
> > +		posix_acl_release(default_acl);
> > +		default_acl = NULL;
> > +	}
> > +
> > +	if (default_acl)
> > +		err = ntfs_set_acl_ex(inode, default_acl, ACL_TYPE_DEFAULT, 1);
> > +
> > +	if (!acl)
> > +		inode->i_acl = NULL;
> > +	else if (!err)
> > +		err = ntfs_set_acl_ex(inode, acl, ACL_TYPE_ACCESS, 1);
> > +
> > +	posix_acl_release(acl);
> > +out1:
> > +	posix_acl_release(default_acl);
> > +
> > +out:
> > +	return err;
> > +}
> > +
> > +static bool ntfs_xattr_user_list(struct dentry *dentry)
> > +{
> > +	return 1;
> > +}
> > +
> > +static const struct xattr_handler ntfs_xattr_handler = {
> > +	.prefix = "",
> > +	.get = ntfs_getxattr,
> > +	.set = ntfs_setxattr,
> > +	.list = ntfs_xattr_user_list,
> > +};
> > +
> > +const struct xattr_handler *ntfs_xattr_handlers[] = { &ntfs_xattr_handler,
> > +						      NULL };
> 

Thanks.

  reply	other threads:[~2020-09-25 16:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18 16:21 [PATCH v6 00/10] NTFS read-write driver GPL implementation by Paragon Software Konstantin Komarov
2020-09-18 16:21 ` [PATCH v6 01/10] fs/ntfs3: Add headers and misc files Konstantin Komarov
2020-09-18 16:21 ` [PATCH v6 02/10] fs/ntfs3: Add initialization of super block Konstantin Komarov
2020-09-18 18:32   ` Mark Harmstone
2020-09-18 16:21 ` [PATCH v6 03/10] fs/ntfs3: Add bitmap Konstantin Komarov
2020-09-18 16:21 ` [PATCH v6 04/10] fs/ntfs3: Add file operations and implementation Konstantin Komarov
2020-09-18 16:21 ` [PATCH v6 05/10] fs/ntfs3: Add attrib operations Konstantin Komarov
2020-09-18 18:27   ` Mark Harmstone
2020-09-25 16:12     ` Konstantin Komarov [this message]
2020-09-18 16:22 ` [PATCH v6 06/10] fs/ntfs3: Add compression Konstantin Komarov
2020-09-18 16:22 ` [PATCH v6 07/10] fs/ntfs3: Add NTFS journal Konstantin Komarov
2020-09-18 16:22 ` [PATCH v6 08/10] fs/ntfs3: Add Kconfig, Makefile and doc Konstantin Komarov
2020-09-18 16:22 ` [PATCH v6 09/10] fs/ntfs3: Add NTFS3 in fs/Kconfig and fs/Makefile Konstantin Komarov
2020-09-18 16:22 ` [PATCH v6 10/10] fs/ntfs3: Add MAINTAINERS Konstantin Komarov

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=779cf3a270d2426b9da1bce6b1801ccc@paragon-software.com \
    --to=almaz.alexandrovich@paragon-software.com \
    --cc=aaptel@suse.com \
    --cc=dsterba@suse.cz \
    --cc=joe@perches.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark@harmstone.com \
    --cc=nborisov@suse.com \
    --cc=pali@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    --subject='RE: [PATCH v6 05/10] fs/ntfs3: Add attrib operations' \
    /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

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).