mbox series

[0/3] ceph: fix races when uninlining data

Message ID 20190710161154.26125-1-jlayton@kernel.org (mailing list archive)
Headers show
Series ceph: fix races when uninlining data | expand

Message

Jeffrey Layton July 10, 2019, 4:11 p.m. UTC
The current code that handles uninlining data is racy. The uninlining
and the update of i_inline_version are not well coordinated, so one task
could end up uninlining the data and then performing a write to the OSD
and then a second task could end up uninlining the data again and
clobber the first task's write.

The first couple of patches do a little cleanup of the uninlining helper
code, and then the last patch fixes the potential race.

Jeff Layton (3):
  ceph: make ceph_uninline_data take inode pointer
  ceph: pass unlocked page to ceph_uninline_data
  ceph: fix potential races in ceph_uninline_data

 fs/ceph/addr.c  | 57 +++++++++++++++++++++++++++----------------------
 fs/ceph/file.c  | 18 ++++++----------
 fs/ceph/super.h |  2 +-
 3 files changed, 39 insertions(+), 38 deletions(-)