gfs2: Re-enable fallocate for the rindex
PATCH 1/1 gfs2: Re-enable fallocate for the rindex
Commit 86066914edff2316cbed63aac8a87d5001441a16 "gfs2: Don't support fallocate on jdata files" removed the ability of gfs2_grow to reserve space at the end of the rindex, which could prevent a second gfs2_grow from succeeding if the fs is full. Allow fallocate to work on the rindex once again.
Signed-off-by Andrew Price <[email protected]>
--- fs/gfs2/file.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
fs/gfs2/file.c +5 -1
@@ -911,11 +911,15 @@ static long __gfs2_fallocate(struct file *file, int mode, loff_t offset, loff_tstatic long gfs2_fallocate (struct file *file,int mode,loff_t offset,loff_t len) {struct inode *inode =file_inode (file); +struct gfs2_sbd *sdp =GFS2_SB (inode);struct gfs2_inode *ip =GFS2_I (inode);struct gfs2_holder gh;int ret; -if ((mode & ~FALLOC_FL_KEEP_SIZE ) ||gfs2_is_jdata (ip)) +if (mode & ~FALLOC_FL_KEEP_SIZE ) +return -EOPNOTSUPP ; +/* fallocate is needed by gfs2_grow to reserve space in the rindex */ +if (gfs2_is_jdata (ip) && inode != sdp->sd_rindex)return -EOPNOTSUPP ;inode_lock (inode);
Signature · 1 line
2.9.3
PATCH 1/1 gfs2: Re-enable fallocate for the rindex
----- Original Message -----
| Commit 86066914edff2316cbed63aac8a87d5001441a16 "gfs2: Don't support | fallocate on jdata files" removed the ability of gfs2_grow to reserve | space at the end of the rindex, which could prevent a second gfs2_grow | from succeeding if the fs is full. Allow fallocate to work on the rindex | once again. | | Signed-off-by: Andrew Price <[email protected]> | ---
Hi,
Thanks. This is now applied to the for-next branch of the linux-gfs2 tree:
https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git/commit/fs/gfs2?h=for-next&id=d4d7fc12b642a16732adeacefdaebe684bcb2218
Regards,
Bob Peterson
Red Hat File Systems