From: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
To: Anand Jain <anand.jain@oracle.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [RESEND PATCH 1/3] btrfs: wrap rdonly check into btrfs_fs_is_rdonly
Date: Fri, 3 Jun 2022 08:43:44 +0000 [thread overview]
Message-ID: <PH0PR04MB7416C47B4A55666510F7FDAA9BA19@PH0PR04MB7416.namprd04.prod.outlook.com> (raw)
In-Reply-To: 0bd3d3777e34a5322fb4d3ec315df4090ee43399.1654216941.git.anand.jain@oracle.com
On 03.06.22 04:04, Anand Jain wrote:
> +static inline bool btrfs_fs_is_rdonly(const struct btrfs_fs_info *fs_info)
> +{
> + bool rdonly = sb_rdonly(fs_info->sb);
> + bool fs_rdonly = test_bit(BTRFS_FS_STATE_RO, &fs_info->fs_state);
> +
> + BUG_ON(rdonly != fs_rdonly);
> +
> + return rdonly;
> +}
Do we really need a BUG_ON() here or can we make it an ASSERT()?
Apart from that
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
next prev parent reply other threads:[~2022-06-03 8:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-03 1:42 [RESEND PATCH 0/3] cleanup rdonly flag and BTRFS_FS_OPEN flag Anand Jain
2022-06-03 1:42 ` [RESEND PATCH 1/3] btrfs: wrap rdonly check into btrfs_fs_is_rdonly Anand Jain
2022-06-03 8:43 ` Johannes Thumshirn [this message]
2022-06-07 10:15 ` Anand Jain
2022-06-07 13:30 ` Johannes Thumshirn
2022-06-21 17:10 ` David Sterba
2022-06-03 1:42 ` [RESEND PATCH 2/3] btrfs: wrap check for BTRFS_FS_OPEN flag into function Anand Jain
2022-06-03 1:42 ` [RESEND PATCH 3/3] btrfs: set BTRFS_FS_OPEN flag for both rdonly and rw Anand Jain
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=PH0PR04MB7416C47B4A55666510F7FDAA9BA19@PH0PR04MB7416.namprd04.prod.outlook.com \
--to=johannes.thumshirn@wdc.com \
--cc=anand.jain@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
/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.