diff options
author | Benjamin Marzinski <bmarzins@redhat.com> | 2011-09-13 03:15:24 +0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2011-10-21 15:39:49 +0400 |
commit | 64dd153c83743af81f20924c6343652d731eeecb (patch) | |
tree | e296566ece355c34cb10ad35ce35f43ca58fd036 /fs/gfs2/incore.h | |
parent | bd5437a7d4307a35f2c7cc19cad706ec0e5d61f0 (diff) | |
download | linux-64dd153c83743af81f20924c6343652d731eeecb.tar.xz |
GFS2: rewrite fallocate code to write blocks directly
GFS2's fallocate code currently goes through the page cache. Since it's only
writing to the end of the file or to holes in it, it doesn't need to, and it
was causing issues on low memory environments. This patch pulls in some of
Steve's block allocation work, and uses it to simply allocate the blocks for
the file, and zero them out at allocation time. It provides a slight
performance increase, and it dramatically simplifies the code.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/incore.h')
-rw-r--r-- | fs/gfs2/incore.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 55e335b52839..6429aa4339ff 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -103,12 +103,15 @@ struct gfs2_rgrpd { enum gfs2_state_bits { BH_Pinned = BH_PrivateStart, BH_Escaped = BH_PrivateStart + 1, + BH_Zeronew = BH_PrivateStart + 2, }; BUFFER_FNS(Pinned, pinned) TAS_BUFFER_FNS(Pinned, pinned) BUFFER_FNS(Escaped, escaped) TAS_BUFFER_FNS(Escaped, escaped) +BUFFER_FNS(Zeronew, zeronew) +TAS_BUFFER_FNS(Zeronew, zeronew) struct gfs2_bufdata { struct buffer_head *bd_bh; |