Re: [PATCH 1/4] vfs: introduce try_to_writeback_inodes_sb(_nr)

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

 



On Thu, Apr 26, 2012 at 10:57:43AM +0800, Miao Xie wrote:
> writeback_inodes_sb(_nr) grabs s_umount lock when it want to start writeback,
> it may bring us deadlock problem when doing umount. So we introduce new
> functions -- try_to_writeback_inodes_sb(_nr) -- which use down_read_trylock()
> instead of down_read() to avoid that deadlock problem.
> 
> This idea came from Christoph Hellwig.
> Some code is from the patch of Kamal Mostafa.

This just re-implements writeback_inodes_[nr]_sb_if_idle() with a
trylock instead of a blocking lock.

Just replace the blocking lock in writeback_inodes_[nr]_sb_if_idle()
with a trylock and use that.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx
--
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