• Sha Zhengju's avatar
    ceph: use vfs __set_page_dirty_nobuffers interface instead of doing it inside filesystem · 7d6e1f54
    Sha Zhengju authored
    Following we will begin to add memcg dirty page accounting around
    __set_page_dirty_{buffers,nobuffers} in vfs layer, so we'd better use vfs interface to
    avoid exporting those details to filesystems.
    
    Since vfs set_page_dirty() should be called under page lock, here we don't need elaborate
    codes to handle racy anymore, and two WARN_ON() are added to detect such exceptions.
    Thanks very much for Sage and Yan Zheng's coaching!
    
    I tested it in a two server's ceph environment that one is client and the other is
    mds/osd/mon, and run the following fsx test from xfstests:
    
      ./fsx   1MB -N 50000 -p 10000 -l 1048576
      ./fsx  10MB -N 50000 -p 10000 -l 10485760
      ./fsx 100MB -N 50000 -p 10000 -l 104857600
    
    The fsx does lots of mmap-read/mmap-write/truncate operations and the tests completed
    successfully without triggering any of WARN_ON.
    Signed-off-by: default avatarSha Zhengju <handai.szj@taobao.com>
    Reviewed-by: default avatarSage Weil <sage@inktank.com>
    7d6e1f54
Name
Last commit
Last update
Documentation Loading commit data...
arch Loading commit data...
block Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt/kvm Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...
REPORTING-BUGS Loading commit data...