[PATCH v2 0/5] ceph: fix races when uninlining data

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

 



v2: fix bugs that Luis pointed out
    close race window involving Uptodate flag
    have copy_file_range do uninlining
    dirty caps after updating i_inline_version

This is the second posting of this set. It closes some other race
windows, and should handle the cap dirtying better than the first.

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 (5):
  ceph: make ceph_uninline_data take inode pointer
  ceph: pass unlocked page to ceph_uninline_data
  ceph: fix potential races in ceph_uninline_data
  ceph: lock page before checking Uptodate flag
  ceph: handle inlined files in copy_file_range

 fs/ceph/addr.c  | 149 ++++++++++++++++++++++++++++++------------------
 fs/ceph/file.c  |  52 +++++++++--------
 fs/ceph/super.h |   2 +-
 3 files changed, 123 insertions(+), 80 deletions(-)

-- 
2.21.0




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux