From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 PATCH] GFS2: Allocate reservation during write_begin if needed
Date: Tue, 17 Feb 2015 12:09:38 -0500 (EST) [thread overview]
Message-ID: <1649964129.14531060.1424192978271.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <651143083.14528614.1424192729406.JavaMail.zimbra@redhat.com>
Hi,
This patch adds a call to function gfs2_rs_alloc to make sure a
reservation structure has been allocated before attempting to
reserve blocks.
Regards,
Bob Peterson
Red Hat File Systems
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
fs/gfs2/aops.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index 805b37f..6453e23 100644
--- a/fs/gfs2/aops.c
+++ b/fs/gfs2/aops.c
@@ -675,6 +675,9 @@ static int gfs2_write_begin(struct file *file, struct address_space *mapping,
if (error)
goto out_unlock;
+ error = gfs2_rs_alloc(ip);
+ if (error)
+ goto out_qunlock;
requested = data_blocks + ind_blocks;
ap.target = requested;
error = gfs2_inplace_reserve(ip, &ap);
next parent reply other threads:[~2015-02-17 17:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <651143083.14528614.1424192729406.JavaMail.zimbra@redhat.com>
2015-02-17 17:09 ` Bob Peterson [this message]
2015-02-17 19:00 ` [Cluster-devel] [GFS2 PATCH] GFS2: Allocate reservation during write_begin if needed Steven Whitehouse
2015-02-17 19:09 ` Bob Peterson
2015-02-17 19:19 ` Steven Whitehouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1649964129.14531060.1424192978271.JavaMail.zimbra@redhat.com \
--to=rpeterso@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).