public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans Reiser <reiser@namesys.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org
Subject: [BK]: reiser4: export generic_{drop,forget}_inode, and fsync_super 1 of 2
Date: Wed, 16 Oct 2002 19:40:24 +0400	[thread overview]
Message-ID: <3DAD8868.30502@namesys.com> (raw)

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

Reiser4 is fairly self-contained, except for a few minor details.  We 
thought it best to send the minor details in earlier than the rest of it.

We'll try to send the rest on the 20th, but one can never predict the 
exact pace of debugging....

Hans

[-- Attachment #2: [PATCH]: [reiser4/1] export generic_{drop,forget}_inode, and fsync_super --]
[-- Type: message/rfc822, Size: 4079 bytes --]

From: Nikita Danilov <Nikita@Namesys.COM>
To: Hans Reiser <Reiser@Namesys.COM>
Subject: [PATCH]: [reiser4/1] export generic_{drop,forget}_inode, and fsync_super
Date: Wed, 16 Oct 2002 18:54:45 +0400
Message-ID: <15789.32181.107418.938194@laputa.namesys.com>

Hello, Linus,

following patch exports fs/inode.c:generic_{drop,forget}_inode(), and
fs/buffer.c:fsync_super().

Without access to generic_{drop,forget}_inode, file system that needs
->drop_inode() super block method would have to duplicate manipulations
with &inode_unused, inodes_stat, and &inode_lock.

fsync_super() is required for reiser4, because during umount we want to
perform some tasks after ->writepage has been called on all pages
dirtied through mmap (that is, after fsync_super()), but before inode
destruction. As a result, reiser4 cannot use kill_block_super() and has
to call fsync_super() explicitly.

This is one of few changes reiser4 requires in the core.

Please, apply.

Hans on behalf of reiser4 team.
diff -X dontdiff -rup bk-linux-2.5/fs/buffer.c linux-2.5-reiser4/fs/buffer.c
--- bk-linux-2.5/fs/buffer.c	Mon Oct 14 17:41:05 2002
+++ linux-2.5-reiser4/fs/buffer.c	Tue Oct 15 11:27:32 2002
@@ -224,6 +224,7 @@ int fsync_super(struct super_block *sb)
 
 	return sync_blockdev(sb->s_bdev);
 }
+EXPORT_SYMBOL(fsync_super);
 
 /*
  * Write out and wait upon all dirty data associated with this
diff -X dontdiff -rup bk-linux-2.5/fs/inode.c linux-2.5-reiser4/fs/inode.c
--- bk-linux-2.5/fs/inode.c	Mon Oct 14 17:41:05 2002
+++ linux-2.5-reiser4/fs/inode.c	Tue Oct 15 11:27:32 2002
@@ -938,7 +938,7 @@ void generic_delete_inode(struct inode *
 }
 EXPORT_SYMBOL(generic_delete_inode);
 
-static void generic_forget_inode(struct inode *inode)
+void generic_forget_inode(struct inode *inode)
 {
 	struct super_block *sb = inode->i_sb;
 
@@ -965,19 +965,21 @@ static void generic_forget_inode(struct 
 	clear_inode(inode);
 	destroy_inode(inode);
 }
+EXPORT_SYMBOL(generic_forget_inode);
 
 /*
  * Normal UNIX filesystem behaviour: delete the
  * inode when the usage count drops to zero, and
  * i_nlink is zero.
  */
-static void generic_drop_inode(struct inode *inode)
+void generic_drop_inode(struct inode *inode)
 {
 	if (!inode->i_nlink)
 		generic_delete_inode(inode);
 	else
 		generic_forget_inode(inode);
 }
+EXPORT_SYMBOL(generic_drop_inode);
 
 /*
  * Called when we're dropping the last reference
diff -X dontdiff -rup bk-linux-2.5/include/linux/fs.h linux-2.5-reiser4/include/linux/fs.h
--- bk-linux-2.5/include/linux/fs.h	Sun Oct 13 03:01:04 2002
+++ linux-2.5-reiser4/include/linux/fs.h	Mon Oct 14 15:01:26 2002
@@ -1197,10 +1197,11 @@ extern struct inode * igrab(struct inode
 extern ino_t iunique(struct super_block *, ino_t);
 extern int inode_needs_sync(struct inode *inode);
 extern void generic_delete_inode(struct inode *inode);
-
 extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval,
 		int (*test)(struct inode *, void *), void *data);
 extern struct inode *ilookup(struct super_block *sb, unsigned long ino);
+extern void generic_drop_inode(struct inode *inode);
+extern void generic_forget_inode(struct inode *inode);
 
 extern struct inode * iget5_locked(struct super_block *, unsigned long, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *);
 extern struct inode * iget_locked(struct super_block *, unsigned long);




                 reply	other threads:[~2002-10-16 15:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3DAD8868.30502@namesys.com \
    --to=reiser@namesys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox