From: Steven Whitehouse <swhiteho@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 19:00:25 +0000 [thread overview]
Message-ID: <54E38FC9.2020709@redhat.com> (raw)
In-Reply-To: <1649964129.14531060.1424192978271.JavaMail.zimbra@redhat.com>
Hi,
Since we set the allocation structure when the write call begins, and it
is not deallocated until there are no writers left with the file open,
how does this happen?
Steve.
On 17/02/15 17:09, Bob Peterson wrote:
> 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 prev parent reply other threads:[~2015-02-17 19:00 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 ` [Cluster-devel] [GFS2 PATCH] GFS2: Allocate reservation during write_begin if needed Bob Peterson
2015-02-17 19:00 ` Steven Whitehouse [this message]
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=54E38FC9.2020709@redhat.com \
--to=swhiteho@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.