On Wed, Aug 31, 2016 at 10:56 AM, NeilBrown <neilb@xxxxxxxx> wrote: > > Hi, > it is quite possible for O_DIRECT and buffered writes to a file to > race. > The xfstests test suite has a test - generic/036 - which tests this > case. > > Unlike most filesystems, cephfs does not hold inode_lock() across > direct writes. This means that buffer pages can become dirty while > direct writes are happening. This confused ceph a little. how about make ceph_write_iter() hold inode_lock() for direct/sync write? Regards Yan, Zheng > > The following two patches allow ceph to handle this possibility a > little more cleanly. The more important patch removes a WARN_ON() for > a circumstance which can easily be triggered. > > Thanks, > NeilBrown -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html