All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Fasheh <mfasheh@suse.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 3/3] ocfs2: Add posix ACL support in ocfs2 v1
Date: Wed, 24 Sep 2008 02:02:05 -0700	[thread overview]
Message-ID: <20080924090205.GZ4563@wotan.suse.de> (raw)
In-Reply-To: <48D9F3EA.9090205@oracle.com>

On Wed, Sep 24, 2008 at 04:01:46PM +0800, Tiger Yang wrote:
> Mark Fasheh wrote:
> >I think we also need some acl-specific handling of chmod in ocfs2_setattr.
> >See ext3_acl_chmod, where it's called and what it does.
> OK. I will add it later after learning ext3.

Great, thanks.


> >Err, this is a pretty bad place for a call which must do work only if we're
> >succesfull in creating the inode. A better place would be a few lines up,
> >maybe even just before the call to 'ocfs2_add_entry()', so that an acl
> >failure won't result in a non-acl-copied inode which is accessible from a
> >directory.
> I put this function here because ocfs2_xattr_set need start transaction.
> So I put it after commit transaction.
> 
> To avoid the issue you mentioned, I modify it to the following
> -       status = ocfs2_init_acl(inode, dir);
> +       if (!status) {
> +               if (ocfs2_init_acl(inode, dir))
> +                       mlog(0, "Init acl error\n");
> +       }
> is this acceptable?

It might be better if we can add the acls before the directory entry. This
means though that you'll have to add them as part of the current
transaction. I think this requires a few changes:
	- Add code to reserve the meta data alloc file
		- Symlinks will need this if the link name is so large it
		  won't allow inline EA's.
		- 512 byte blocks will need to always reserve a block for
		  the external EA block
	- If the acl value won't fit inline, reserve more clusters from the
	  cluster allocator.
	- Add the proper number of credits to those already passed to
	  ocfs2_start_trans(). I think the common case will be zero, but
	  when we attach an external ea block or have a value in an extent,
	  we'll need more.
	- Pass the handle, and allocators through to ocfs2_init_acl()
	  so that it can all be done in the current transaction.

Thanks,
	--Mark

--
Mark Fasheh

      reply	other threads:[~2008-09-24  9:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-19  9:35 [Ocfs2-devel] [PATCH 0/3] ocfs2: add security EA and ACL support v1 Tiger Yang
2008-09-19  9:42 ` [Ocfs2-devel] [PATCH 1/3] ocfs2: small fix in xattr Tiger Yang
2008-09-19  9:42 ` [Ocfs2-devel] [PATCH 2/3] ocfs2: Add security xattr support in ocfs2 Tiger Yang
2008-09-23  6:28   ` Mark Fasheh
2008-09-24  7:37     ` Tiger Yang
2008-09-24  8:47       ` Mark Fasheh
2008-09-23  6:33   ` Mark Fasheh
2008-09-24  7:44     ` Tiger Yang
2008-09-24  8:51       ` Mark Fasheh
2008-10-02  8:09     ` Christoph Hellwig
2008-09-19  9:43 ` [Ocfs2-devel] [PATCH 3/3] ocfs2: Add posix ACL support in ocfs2 v1 Tiger Yang
2008-09-23  7:11   ` Mark Fasheh
2008-09-24  8:01     ` Tiger Yang
2008-09-24  9:02       ` Mark Fasheh [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=20080924090205.GZ4563@wotan.suse.de \
    --to=mfasheh@suse.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /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 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.