public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Gruenbacher <agruen@suse.de>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Christoph Hellwig <hch@infradead.org>, linux-kernel@vger.kernel.org
Subject: Re: Add extended attributes to ext2/3
Date: Tue, 15 Oct 2002 23:00:32 +0200	[thread overview]
Message-ID: <200210152300.32190.agruen@suse.de> (raw)
In-Reply-To: <20021015182943.GA1335@think.thunk.org>

[-- Attachment #1: Type: text/plain, Size: 1331 bytes --]

On Tuesday 15 October 2002 20:29, Theodore Ts'o wrote:
> It looks like the ext3 change in fix-acl.diff was to revert a change
> that I never had; it's not in the 2.4 0.8.50 patches, and it wasn't in
> my patches.  So I'm not sure what's going on there.

Utter confusion has arisen. Can you put the current versions of your patches 
at a well known location (web/ftp/cvs), so we can more easily check and patch 
against them? That would be great.

The fix-acl patch is on top of either 0.8.50 or 8.0.51. The x_init_acl() dirty 
the inode themselves (at least they should). Initially the x_dirty_inode() 
calls had been moved below the x_init_acl() calls, but this is no longer 
necessary, and so the patch moved them up again.

BUG: I have overlooked the dummy implementation of ext[23]_init_acl(). Please 
find attached a corrected version.

> The ext2 change in fix-acl.diff looks *wrong*.  It removes a call to
> mark_inode_dirty which was there in the original, and which is
> necessary.

The original ext2_new_inode with no xattr/acl patches calls mark_inode_dirty 
before unlock_super. This call is not removed in 0.8.50 or 0.8.51, but a 
second call is added below ext2_init_acl. Since ext2_init_acl takes care of 
dirtying the inode itself this second call is no longer needed (I hope!)

--Andreas.

[-- Attachment #2: fix-acl2.diff --]
[-- Type: text/x-diff, Size: 2118 bytes --]

--- linux-2.4.19.old/fs/ext3/ialloc.c	2002-10-15 14:18:59.000000000 +0200
+++ linux-2.4.19.new/fs/ext3/ialloc.c	2002-10-15 14:16:34.000000000 +0200
@@ -510,7 +510,9 @@
 	inode->i_generation = sb->u.ext3_sb.s_next_generation++;
 
 	inode->u.ext3_i.i_state = EXT3_STATE_NEW;
-
+	err = ext3_mark_inode_dirty(handle, inode);
+	if (err) goto fail;
+	
 	unlock_super (sb);
 	if(DQUOT_ALLOC_INODE(inode)) {
 		DQUOT_DROP(inode);
@@ -522,12 +524,6 @@
 		DQUOT_FREE_INODE(inode);
 		goto fail2;
 	}
-	err = ext3_mark_inode_dirty(handle, inode);
-	if (err) {
-		DQUOT_FREE_INODE(inode);
-		goto fail2;
-	}
-
 	ext3_debug ("allocating inode %lu\n", inode->i_ino);
 	return inode;
 
diff -Nur --exclude='*.orig' linux-2.4.19.old/fs/ext2/ialloc.c linux-2.4.19.new/fs/ext2/ialloc.c
--- linux-2.4.19.old/fs/ext2/ialloc.c	2002-10-15 15:32:24.000000000 +0200
+++ linux-2.4.19.new/fs/ext2/ialloc.c	2002-10-15 15:32:16.000000000 +0200
@@ -410,7 +410,6 @@
 		DQUOT_FREE_INODE(inode);
 		goto fail3;
 	}
-	mark_inode_dirty(inode);
 
 	ext2_debug ("allocating inode %lu\n", inode->i_ino);
 	return inode;
--- linux-2.4.19/fs/ext3/file.c	2002-10-15 22:39:06.000000000 +0200
+++ linux-2.4.19.new/fs/ext3/file.c	2002-10-15 22:34:04.000000000 +0200
@@ -21,6 +21,7 @@
 #include <linux/sched.h>
 #include <linux/fs.h>
 #include <linux/locks.h>
+#include <linux/ext3_jbd.h>
 #include <linux/jbd.h>
 #include <linux/ext3_fs.h>
 #include <linux/ext3_xattr.h>
--- linux-2.4.19/include/linux/ext2_acl.h	2002-10-15 22:47:09.000000000 +0200
+++ linux-2.4.19.new/include/linux/ext2_acl.h	2002-10-15 22:30:58.000000000 +0200
@@ -87,6 +87,7 @@
 static inline int ext2_init_acl (struct inode *inode, struct inode *dir)
 {
 	inode->i_mode &= ~current->fs->umask;
+	mark_inode_dirty(inode);
 	return 0;
 }
 
--- linux-2.4.19/include/linux/ext3_acl.h	2002-10-15 22:47:16.000000000 +0200
+++ linux-2.4.19.new/include/linux/ext3_acl.h	2002-10-15 22:30:37.000000000 +0200
@@ -90,6 +90,7 @@
 ext3_init_acl(handle_t *handle, struct inode *inode, struct inode *dir)
 {
 	inode->i_mode &= ~current->fs->umask;
+	ext3_mark_inode_dirty(handle, inode);
 	return 0;
 }
 

  reply	other threads:[~2002-10-15 20:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-15 14:40 Add extended attributes to ext2/3 Andreas Gruenbacher
2002-10-15 18:29 ` Theodore Ts'o
2002-10-15 21:00   ` Andreas Gruenbacher [this message]
2002-10-15 22:01     ` Andreas Dilger
2002-10-15 22:09       ` Andreas Gruenbacher
2002-10-15 22:18         ` Andreas Gruenbacher
2002-10-21 10:48       ` Alan Cox

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=200210152300.32190.agruen@suse.de \
    --to=agruen@suse.de \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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