From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Peterson Date: Thu, 14 Nov 2019 13:53:47 -0500 (EST) Subject: [Cluster-devel] [GFS2 PATCH] gfs2: Introduce function gfs2_withdrawn In-Reply-To: References: <946265143.29711102.1573742986193.JavaMail.zimbra@redhat.com> <788089991.29722188.1573743135983.JavaMail.zimbra@redhat.com> Message-ID: <429182855.30077979.1573757627399.JavaMail.zimbra@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ----- Original Message ----- > On Thu, Nov 14, 2019 at 3:52 PM Bob Peterson wrote: > > This patch adds function gfs2_withdrawn and replaces all checks > > for the SDF_WITHDRAWN bit to call it. This does not change the > > logic or function of gfs2, and it facilitates later improvements > > to the withdraw sequence. > > This looks mostly okay, but: > > > +/** > > + * gfs2_withdrawn - test whether the file system is withdrawing or > > withdrawn > > + * @sdp: the superblock > > + */ > > +static inline bool gfs2_withdrawn(struct gfs2_sbd *sdp) > > +{ > > + if (test_bit(SDF_WITHDRAWN, &sdp->sd_flags)) > > + return true; > > + return false; > > return test_bit(SDF_WITHDRAWN, &sdp->sd_flags) > > > +} > > Thanks, > Andreas Well, I can certainly do that, but this patch is a predecessor to another that checks two bits instead of one. I could or them, of course.