From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Sun, 26 May 2013 14:51:15 +0100 Subject: [Cluster-devel] [GFS2 PATCH] GFS2: Set log descriptor type for jdata blocks In-Reply-To: <788202789.28848005.1369422169503.JavaMail.root@redhat.com> References: <788202789.28848005.1369422169503.JavaMail.root@redhat.com> Message-ID: <1369576275.2737.3.camel@menhir> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, On Fri, 2013-05-24 at 15:02 -0400, Bob Peterson wrote: > Hi, > > This patch sets the log descriptor type according to whether the > journal commit is for (journaled) data or metadata. This was > recently broken when the functions to process data and metadata > log ops were combined. > > Regards, > > Bob Peterson > Red Hat File Systems > Thanks - looks good. If we can automatically detect the erroneous entries, could we also automatically deal with those too? That might be useful in case people already have such entries in their logs, Steve. > Signed-off-by: Bob Peterson > --- > fs/gfs2/lops.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c > index 0457768..33f18b7 100644 > --- a/fs/gfs2/lops.c > +++ b/fs/gfs2/lops.c > @@ -435,7 +435,9 @@ static void gfs2_before_commit(struct gfs2_sbd *sdp, unsigned int limit, > if (total > limit) > num = limit; > gfs2_log_unlock(sdp); > - page = gfs2_get_log_desc(sdp, GFS2_LOG_DESC_METADATA, num + 1, num); > + page = gfs2_get_log_desc(sdp, > + is_databuf ? GFS2_LOG_DESC_JDATA : > + GFS2_LOG_DESC_METADATA, num + 1, num); > ld = page_address(page); > gfs2_log_lock(sdp); > ptr = (__be64 *)(ld + 1); >