Re: [PATCH] UDF: fix deadlock on inode being dropped

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

 



On Sat 09-06-07 17:35:36, Cyrill Gorcunov wrote:
> [Jan Kara - Thu, Jun 07, 2007 at 04:41:21PM +0200]
> | On Thu 07-06-07 17:54:58, Cyrill Gorcunov wrote:
> | > [Jan Kara - Thu, Jun 07, 2007 at 11:36:07AM +0200]
> | > |   Hi Cyrill!
> | > | 
> | > | On Wed 06-06-07 21:53:51, Cyrill Gorcunov wrote:
> | > | > This patch prevents from deadlock on inode being dropped.
> | > | > The deadlock is caused by inderect call of mark_inode_dirty()
> | > | > within udf_drop_inode() but inode lock is already kept
> | > | > by the kernel. So moving code from udf_drop_inode() to
> | > | > udf_delete_inode() we save its functionality and avoid
> | > | > deadlock.
> | > |   The patch is wrong. You cannot truncate the extent just in delete_inode.
> | > | That would lead to inodes with untruncated last extent on disk after
> | > | unmounting, which is forbidden in the specification. You need to truncate
> | > | the last extent whenever inode is being removed from memory or something
> | > | like that... I'm already thinking how to do it and avoid calling
> | > | mark_inode_dirty()...
> | > | 
> | > 
> | > Arh, thanks... Jan, actually the reason I've moved the code into
> | > 'delete' section was that I found no reasonable difference for our
> | > case between 'drop' and 'delete'. Moreover, by seeing into VFS code
> | > the only diff between 'drop' and 'delete' is that
> | > inside generic_delete_inode() a few inode structure elements
> | > are being destroyed and then our udf_drop_inode is called. So assuming,
> | > that you're right in drop_inode I've code just moved to 'delete' section.
> |   The difference is that udf_delete_inode() is called only when inode has
> | i_nlink == 0 and thus it's being deleted on disk. udf_drop_inode() is
> | called whenever inode is removed from memory which is what we want.
> |   I'm already testing a patch which should fix the problem...
> 
> how your progress? Could I help with something?
  Eric has run his UDF test suite on it and it seems to survive fine so I'm
going to submit the patch to Andrew in a while.

									Honza

-- 
Jan Kara <[email protected]>
SuSE CR Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux