]> git.michaelhowe.org Git - packages/o/openafs.git/commit
afs: Do not skip flushing pages for dv-0 files
authorAndrew Deason <adeason@sinenomine.net>
Thu, 15 Nov 2012 00:29:35 +0000 (18:29 -0600)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 28 Nov 2012 15:18:44 +0000 (07:18 -0800)
commited8af9f7d05c641716e7e281d0c00d06b22b3d27
treef7416d8ee95e772ae070b89aa04aff6e39355bce
parentb2d17370ab68d818bdc8d04cb6d752c1be55f207
afs: Do not skip flushing pages for dv-0 files

If the dv for a file is 0, we know the file is empty. Currently we
skip flushing pages for such files, presumably the idea being there is
no data in the file, so there should be no pages to flush.

However, Linux seems to keep empty pages around for empty files. So, a
future read can result in the application reading a page full of
zeroes, unless we flush the page here. While this has only been found
to happen on Linux 2.6.22 and later (and distribution-specific
backports, like RHEL 2.6.18-128), other platforms could in theory also
choose to do this. It would be difficult to find out when another
platform started to behave like this, so just remove this skip for
everyone so we never have to deal with this again.

Replace this code with a comment with a quick explanation, in case
anyone tries to add a similar optimization here in the future.

Thanks to Richard Brittain.

Reviewed-on: http://gerrit.openafs.org/8465
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit ad4e634051e18fa5bd07016b6405e53e236c2f45)

Change-Id: I76aed81e0d8acdbf13bc952ac8557b051d2869bf
Reviewed-on: http://gerrit.openafs.org/8484
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/afs/afs_osi_vm.c