Re: [PATCH][RFC] fix reservation discarding in affs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 10, 2005 at 01:57:04PM +0100, Roman Zippel wrote:
> > affs already does it in a) and a few other places, so adding it to
> > affs_clear_inode should make it behave fine.   Also move the truncate
> > from affs_put_inode with the racy i_count check to affs_clear_inode.
> > This also avoids the need to take the inode semaphore as the inode can't
> > be accessed from other threads anymore.
> 
> Looks fine.
> There is still somewhat the problem that I don't want to hold on to the 
> preallocation for ages for directories and very useful would be a 
> callback to flush preallocation when the disk becomes full. Previously I 
> tried it via sync, but maybe someone has an idea how to do this properly.

For some reason this never got any traction.  Below is a respin against
curently mainline.  The preallocations are still released later so no
progress on that end.  Because this is the last instance of ->put_inode
I'd like to move forward on getting rid of it.

Is there any chance you could either send me a affs image to run fsx
on it or do it yourself?


Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Index: linux-2.6/fs/affs/affs.h
===================================================================
--- linux-2.6.orig/fs/affs/affs.h	2008-01-10 10:46:07.000000000 +0100
+++ linux-2.6/fs/affs/affs.h	2008-01-10 10:46:08.000000000 +0100
@@ -170,7 +170,6 @@ extern int	affs_rename(struct inode *old
 extern unsigned long		 affs_parent_ino(struct inode *dir);
 extern struct inode		*affs_new_inode(struct inode *dir);
 extern int			 affs_notify_change(struct dentry *dentry, struct iattr *attr);
-extern void			 affs_put_inode(struct inode *inode);
 extern void			 affs_drop_inode(struct inode *inode);
 extern void			 affs_delete_inode(struct inode *inode);
 extern void			 affs_clear_inode(struct inode *inode);
Index: linux-2.6/fs/affs/inode.c
===================================================================
--- linux-2.6.orig/fs/affs/inode.c	2008-01-10 10:46:07.000000000 +0100
+++ linux-2.6/fs/affs/inode.c	2008-01-10 16:06:25.000000000 +0100
@@ -239,15 +239,10 @@ out:
 }
 
 void
-affs_put_inode(struct inode *inode)
+affs_drop_inode(struct inode *inode)
 {
-	pr_debug("AFFS: put_inode(ino=%lu, nlink=%u)\n", inode->i_ino, inode->i_nlink);
 	affs_free_prealloc(inode);
-}
 
-void
-affs_drop_inode(struct inode *inode)
-{
 	mutex_lock(&inode->i_mutex);
 	if (inode->i_size != AFFS_I(inode)->mmu_private)
 		affs_truncate(inode);
Index: linux-2.6/fs/affs/super.c
===================================================================
--- linux-2.6.orig/fs/affs/super.c	2008-01-10 10:46:07.000000000 +0100
+++ linux-2.6/fs/affs/super.c	2008-01-10 10:46:08.000000000 +0100
@@ -115,7 +115,6 @@ static const struct super_operations aff
 	.destroy_inode	= affs_destroy_inode,
 	.read_inode	= affs_read_inode,
 	.write_inode	= affs_write_inode,
-	.put_inode	= affs_put_inode,
 	.drop_inode	= affs_drop_inode,
 	.delete_inode	= affs_delete_inode,
 	.clear_inode	= affs_clear_inode,
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux