aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/incore.h
diff options
context:
space:
mode:
authorBenjamin Marzinski <bmarzins@redhat.com>2011-09-12 19:15:24 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2011-10-21 07:39:49 -0400
commit64dd153c83743af81f20924c6343652d731eeecb (patch)
treee296566ece355c34cb10ad35ce35f43ca58fd036 /fs/gfs2/incore.h
parentbd5437a7d4307a35f2c7cc19cad706ec0e5d61f0 (diff)
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.h3
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 {
103enum gfs2_state_bits { 103enum gfs2_state_bits {
104 BH_Pinned = BH_PrivateStart, 104 BH_Pinned = BH_PrivateStart,
105 BH_Escaped = BH_PrivateStart + 1, 105 BH_Escaped = BH_PrivateStart + 1,
106 BH_Zeronew = BH_PrivateStart + 2,
106}; 107};
107 108
108BUFFER_FNS(Pinned, pinned) 109BUFFER_FNS(Pinned, pinned)
109TAS_BUFFER_FNS(Pinned, pinned) 110TAS_BUFFER_FNS(Pinned, pinned)
110BUFFER_FNS(Escaped, escaped) 111BUFFER_FNS(Escaped, escaped)
111TAS_BUFFER_FNS(Escaped, escaped) 112TAS_BUFFER_FNS(Escaped, escaped)
113BUFFER_FNS(Zeronew, zeronew)
114TAS_BUFFER_FNS(Zeronew, zeronew)
112 115
113struct gfs2_bufdata { 116struct gfs2_bufdata {
114 struct buffer_head *bd_bh; 117 struct buffer_head *bd_bh;