Ceph kernel client (kernel modules)
Clone or download
idryomov rbd: don't return 0 on unmap if RBD_DEV_FLAG_REMOVING is set
There is a window between when RBD_DEV_FLAG_REMOVING is set and when
the device is removed from rbd_dev_list.  During this window, we set
"already" and return 0.

Returning 0 from write(2) can confuse userspace tools because
0 indicates that nothing was written.  In particular, "rbd unmap"
will retry the write multiple times a second:

  10:28:05.463299 write(4, "0", 1)        = 0
  10:28:05.463509 write(4, "0", 1)        = 0
  10:28:05.463720 write(4, "0", 1)        = 0
  10:28:05.463942 write(4, "0", 1)        = 0
  10:28:05.464155 write(4, "0", 1)        = 0

Cc: stable@vger.kernel.org
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
Latest commit 85f5a4d Jan 8, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Documentation Merge tag 'kbuild-v4.21-3' of git://git.kernel.org/pub/scm/linux/kern… Jan 7, 2019
LICENSES Merge tag 'docs-4.20' of git://git.lwn.net/linux Oct 24, 2018
arch Merge tag 'kbuild-v4.21-3' of git://git.kernel.org/pub/scm/linux/kern… Jan 7, 2019
block Merge tag 'for-4.21/block-20190102' of git://git.kernel.dk/linux-block Jan 3, 2019
certs kbuild: remove redundant target cleaning on failure Jan 6, 2019
crypto Merge tag 'kconfig-v4.21' of git://git.kernel.org/pub/scm/linux/kerne… Dec 29, 2018
drivers rbd: don't return 0 on unmap if RBD_DEV_FLAG_REMOVING is set Jan 10, 2019
firmware kbuild: change filechk to surround the given command with { } Jan 6, 2019
fs ceph: use vmf_error() in ceph_filemap_fault() Jan 7, 2019
include libceph: allow setting abort_on_full for rbd Jan 7, 2019
init jump_label: move 'asm goto' support test to Kconfig Jan 6, 2019
ipc ipc: IPCMNI limit check for semmni Oct 31, 2018
kernel Merge tag 'kbuild-v4.21-3' of git://git.kernel.org/pub/scm/linux/kern… Jan 7, 2019
lib Merge tag 'kbuild-v4.21-3' of git://git.kernel.org/pub/scm/linux/kern… Jan 7, 2019
mm Change mincore() to count "mapped" pages rather than "cached" pages Jan 6, 2019
net libceph: allow setting abort_on_full for rbd Jan 7, 2019
samples Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel… Jan 6, 2019
scripts kconfig: rename generated .*conf-cfg to *conf-cfg Jan 6, 2019
security Merge branch 'mount.part1' of git://git.kernel.org/pub/scm/linux/kern… Jan 5, 2019
sound Remove 'type' argument from access_ok() function Jan 4, 2019
tools Merge tag 'kbuild-v4.21-3' of git://git.kernel.org/pub/scm/linux/kern… Jan 7, 2019
usr user/Makefile: Fix typo and capitalization in comment section Dec 10, 2018
virt Merge branch 'akpm' (patches from Andrew) Jan 5, 2019
.clang-format page cache: Convert find_get_pages_contig to XArray Oct 21, 2018
.cocciconfig scripts: add Linux .cocciconfig for coccinelle Jul 22, 2016
.get_maintainer.ignore Add hch to .get_maintainer.ignore Aug 21, 2015
.gitattributes .gitattributes: set git diff driver for C source code files Oct 8, 2016
.gitignore kbuild: Add support for DT binding schema checks Dec 13, 2018
.mailmap Merge tag 'mips_fixes_4.21_1' of git://git.kernel.org/pub/scm/linux/k… Jan 5, 2019
COPYING COPYING: use the new text with points to the license files Mar 23, 2018
CREDITS Add CREDITS entry for Shaohua Li Jan 4, 2019
Kbuild kbuild: use assignment instead of define ... endef for filechk_* rules Jan 6, 2019
Kconfig kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt Aug 1, 2018
MAINTAINERS Merge tag 'tag-chrome-platform-for-v4.21' of git://git.kernel.org/pub… Jan 6, 2019
Makefile Linux 5.0-rc1 Jan 7, 2019
README Drop all 00-INDEX files from Documentation/ Sep 9, 2018

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.