[Cluster-devel] [GFS2 PATCH] GFS2: Fix allocation error bug with recursive rgrp glocking
Bob Peterson
rpeterso at redhat.com
Thu May 31 12:26:46 UTC 2018
----- Original Message -----
> Bob,
>
> On 30 May 2018 at 21:14, Bob Peterson <rpeterso at redhat.com> wrote:
> > Before this patch function gfs2_write_begin, upon discovering an
> > error, called gfs2_trim_blocks while the rgrp glock was still held.
> > That's because gfs2_inplace_release is not called until later.
>
> agreed.
>
> > This patch reorganizes the logic a bit so gfs2_inplace_release
> > is called to release the lock prior to the call to gfs2_trim_blocks,
> > thus preventing the glock recursion.
>
> gfs2_trim_blocks only needs to be called after __block_write_begin but
> with your proposed patch, it also ends up being called on other error
> paths. This complicates gfs2_write_begin, so how about the below patch
> instead?
>
> Thanks,
> Andreas
Hi Andreas,
My previous version looked a lot like yours, so yes, I'll take your
version instead. It's going to be overwritten by your iomap-write
patch set eventually anyway.
Regards,
Bob Peterson
More information about the Cluster-devel
mailing list