On Wed, 29 Jul 2009, Jun'ichi Nomura wrote: > Hi Mikulas, > > Mikulas Patocka wrote: > > Drop the mutex. > > > > It doesn't make sense to lock it for a single assignment, this code can't > > be executed concurrently. The size should be read with i_size_read which > > is automatically protected against concurrent i_size_write. > > But it seems there are codes which depend on i_mutex for > protected access to i_size: e.g. block_write_begin(). You are right, but I don't know what to do with it. Catch such uses and convert them to i_size_read? > And while my description only mentioned noflush suspend, > with 2.6.31-rc, the deadlock can occur under normal suspend > because the new barrier code may push bios to deferred queue. It can deadlock with any code that takes i_mutex and submits or waits for i/os, regardless of barriers. Mikulas -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel