[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9717059f-cbd3-3dc3-90a2-f9ef7c32b8d9@gmx.com>
Date: Thu, 11 Nov 2021 07:47:49 +0800
From: Qu Wenruo <quwenruo.btrfs@....com>
To: Colin Ian King <colin.i.king@...glemail.com>,
Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>, Qu Wenruo <wqu@...e.com>,
linux-btrfs@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] btrfs: make 1-bit bit-fields unsigned int
On 2021/11/11 03:20, Colin Ian King wrote:
> The bitfields have_csum and io_error are currently signed which is
> not recommended as the representation is an implementation defined
> behaviour. Fix this by making the bit-fields unsigned ints.
>
> Fixes: 2c36395430b0 ("btrfs: scrub: remove the anonymous structure from scrub_page")
> Signed-off-by: Colin Ian King <colin.i.king@...il.com>
Reviewed-by: Qu Wenruo <wqu@...e.com>
Thanks,
Qu
> ---
> fs/btrfs/scrub.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
> index cf82ea6f54fb..8f6ceea33969 100644
> --- a/fs/btrfs/scrub.c
> +++ b/fs/btrfs/scrub.c
> @@ -73,8 +73,8 @@ struct scrub_page {
> u64 physical_for_dev_replace;
> atomic_t refs;
> u8 mirror_num;
> - int have_csum:1;
> - int io_error:1;
> + unsigned int have_csum:1;
> + unsigned int io_error:1;
> u8 csum[BTRFS_CSUM_SIZE];
>
> struct scrub_recover *recover;
>
Powered by blists - more mailing lists