lkml.org 
[lkml]   [2015]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC 0/4] change sb_writers to use percpu_rw_semaphore
On Thu, Jul 16, 2015 at 07:32:56PM +0200, Oleg Nesterov wrote:
>
> #ifdef CONFIG_LOCKDEP
> /*
> * We want lockdep to tell us about possible deadlocks with freezing but
> * it's it bit tricky to properly instrument it. Getting a freeze protection
> * works as getting a read lock but there are subtle problems. XFS for example
> * gets freeze protection on internal level twice in some cases, which is OK

Sorry, I've missed something here - where is XFS nesting
sb_start_intwrite() calls? XFS only has a call to
sb_start_intwrite() in xfs_trans_alloc() and an open coded
equivalent in xfs_iomap_write_unwritten(). However, we cannot create
nested transaction contexts as doing so is *guaranteed to deadlock
the journal*. (e.g. why we use PF_FSTRANS to trigger GFP_NOFS
allocation as it prevents direct memory reclaim from causing nested
transactions.) Hence if we taking multiple FREEZE_FS level
references at a time then there is a bug that needs fixing....

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com


\
 
 \ /
  Last update: 2015-07-17 03:41    [W:0.134 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site