1
0
Fork 0
alistair23-linux/fs/orangefs
Mike Marshall 974ca069d5 orangefs: get rid of knob code...
commit ec95f1dedc upstream.

Christoph Hellwig sent in a reversion of "orangefs: remember count
when reading." because:

  ->read_iter calls can race with each other and one or
  more ->flush calls. Remove the the scheme to store the read
  count in the file private data as is is completely racy and
  can cause use after free or double free conditions

Christoph's reversion caused Orangefs not to work or to compile. I
added a patch that fixed that, but intel's kbuild test robot pointed
out that sending Christoph's patch followed by my patch upstream, it
would break bisection because of the failure to compile. So I have
combined the reversion plus my patch... here's the commit message
that was in my patch:

  Logically, optimal Orangefs "pages" are 4 megabytes. Reading
  large Orangefs files 4096 bytes at a time is like trying to
  kick a dead whale down the beach. Before Christoph's "Revert
  orangefs: remember count when reading." I tried to give users
  a knob whereby they could, for example, use "count" in
  read(2) or bs with dd(1) to get whatever they considered an
  appropriate amount of bytes at a time from Orangefs and fill
  as many page cache pages as they could at once.

  Without the racy code that Christoph reverted Orangefs won't
  even compile, much less work. So this replaces the logic that
  used the private file data that Christoph reverted with
  a static number of bytes to read from Orangefs.

  I ran tests like the following to determine what a
  reasonable static number of bytes might be:

  dd if=/pvfsmnt/asdf of=/dev/null count=128 bs=4194304
  dd if=/pvfsmnt/asdf of=/dev/null count=256 bs=2097152
  dd if=/pvfsmnt/asdf of=/dev/null count=512 bs=1048576
                            .
                            .
                            .
  dd if=/pvfsmnt/asdf of=/dev/null count=4194304 bs=128

  Reads seem faster using the static number, so my "knob code"
  wasn't just racy, it wasn't even a good idea...

Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-21 13:05:29 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
acl.c orangefs: reorganize setattr functions to track attribute changes 2019-05-03 14:32:38 -04:00
dcache.c orangefs: reverse sense of is-inode-stale test in d_revalidate 2018-02-06 16:38:13 -05:00
devorangefs-req.c Merge branch 'work.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-16 16:21:50 +09:00
dir.c orangefs: stop setting atime on inode dirty 2017-11-13 15:10:11 -05:00
downcall.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
file.c orangefs: get rid of knob code... 2020-08-21 13:05:29 +02:00
inode.c orangefs: get rid of knob code... 2020-08-21 13:05:29 +02:00
namei.c orangefs: Add octal zero prefix 2019-09-12 14:17:16 -04:00
orangefs-bufmap.c mm/gup: change GUP fast to use flags rather than a write 'bool' 2019-05-14 09:47:46 -07:00
orangefs-bufmap.h orangefs: copy Orangefs-sized blocks into the pagecache if possible. 2019-05-03 14:32:39 -04:00
orangefs-cache.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
orangefs-debug.h orangefs: remove unused code 2018-04-03 21:55:28 -04:00
orangefs-debugfs.c help_next should increase position index 2020-02-24 08:37:02 +01:00
orangefs-debugfs.h orangefs: fix build warning from debugfs cleanup patch 2019-07-04 10:30:33 +02:00
orangefs-dev-proto.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
orangefs-kernel.h orangefs: get rid of knob code... 2020-08-21 13:05:29 +02:00
orangefs-mod.c orangefs: fix build warning from debugfs cleanup patch 2019-07-04 10:30:33 +02:00
orangefs-sysfs.c orangefs: add orangefs_revalidate_mapping 2019-05-03 14:32:39 -04:00
orangefs-sysfs.h Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
orangefs-utils.c orangefs: skip inode writeout if nothing to write 2019-05-03 14:32:38 -04:00
protocol.h orangefs: specify user pointers when using dev_map_desc and bufmap 2018-06-01 14:51:36 -04:00
super.c Orangefs: This pull request includes one fix and our "Orangefs through 2019-05-09 09:37:25 -07:00
symlink.c orangefs: stop setting atime on inode dirty 2017-11-13 15:10:11 -05:00
upcall.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
waitqueue.c orangefs: service ops done for writeback are not killable 2019-05-03 14:32:38 -04:00
xattr.c orangefs: implement xattr cache 2019-05-03 14:32:37 -04:00