Skip to contentSkip to conversation

2.4.10 improved reiserfs a lot, but could still be better

PATCH Beau Kuiper 1 participant 1 message Sep 24, 2001 VFS

lore
Share & tools
lore
#0 lore raw
Quoted 5 lines

Thanks to everyone who has helped me so far, and I look forward to further comments and assistance,
Beau Kuiper
[email protected]

And I should attach the patch :-) Sorry about that

Beau Kuiper
[email protected]

fs/buffer.c renamed from linux/fs/buffer.c +2 -2
@@ -359,7 +359,7 @@
 	lock_kernel();
 	sync_inodes(dev);
 	DQUOT_SYNC(dev);
-	sync_supers(dev);
+	sync_supers(dev, 0);
 	unlock_kernel();
 
 	return sync_buffers(dev, 1);
@@ -2753,7 +2753,7 @@
 {
 	lock_kernel();
 	sync_unlocked_inodes();
-	sync_supers(0);
+	sync_supers(0, 1);
 	unlock_kernel();
 
 	for (;;) {
fs/super.c renamed from linux/fs/super.c +40 -4

77 lines not on this page · raw message

include/linux/fs.h renamed from linux/include/linux/fs.h +3 -1
@@ -689,6 +689,7 @@
 	unsigned long		s_blocksize;
 	unsigned char		s_blocksize_bits;
 	unsigned char		s_dirt;
+	unsigned char		s_flushed;
 	unsigned long long	s_maxbytes;	/* Max file size */
 	struct file_system_type	*s_type;
 	struct super_operations	*s_op;
@@ -859,6 +860,7 @@
 	void (*delete_inode) (struct inode *);
 	void (*put_super) (struct super_block *);
 	void (*write_super) (struct super_block *);
+	void (*write_super_kupdated) (struct super_block *);
 	void (*write_super_lockfs) (struct super_block *);
 	void (*unlockfs) (struct super_block *);
 	int (*statfs) (struct super_block *, struct statfs *);
@@ -1198,7 +1200,7 @@
 extern int inode_has_buffers(struct inode *);
 extern void filemap_fdatasync(struct address_space *);
 extern void filemap_fdatawait(struct address_space *);
-extern void sync_supers(kdev_t);
+extern void sync_supers(kdev_t, int);
 extern int bmap(struct inode *, int);
 extern int notify_change(struct dentry *, struct iattr *);
 extern int permission(struct inode *, int);
fs/reiserfs/super.c renamed from linux/fs/reiserfs/super.c +13 -2
@@ -32,18 +31,28 @@
 // at the ext2 code and comparing. It's subfunctions contain no code
 // used as a template unless they are so labeled.
 //
-void reiserfs_write_super (struct super_block * s)
+void reiserfs_write_super_ex (struct super_block * s, int immediate)
 {
 
   int dirty = 0 ;
   lock_kernel() ;
   if (!(s->s_flags & MS_RDONLY)) {
-    dirty = flush_old_commits(s, 1) ;
+    dirty = flush_old_commits(s, immediate) ;
   }
   s->s_dirt = dirty;
   unlock_kernel() ;
 }
 
+void reiserfs_write_super_kupdated (struct super_block * s)
+{
+	reiserfs_write_super_ex(s, 0);
+}
+
+void reiserfs_write_super (struct super_block * s)
+{
+	reiserfs_write_super_ex(s, 1);
+}
+
 //
 // a portion of this function, particularly the VFS interface portion,
 // was derived from minix or ext2's analog and evolved as the
@@ -125,6 +134,7 @@
   dirty_inode: reiserfs_dirty_inode,
   delete_inode: reiserfs_delete_inode,
   put_super: reiserfs_put_super,
+  write_super_kupdated: reiserfs_write_super_kupdated,
   write_super: reiserfs_write_super,
   write_super_lockfs: reiserfs_write_super_lockfs,
   unlockfs: reiserfs_unlockfs,