* [PATCH] btrfs: use BLK_STS defines where needed
@ 2017-10-14 0:35 Anand Jain
2017-10-14 15:06 ` Satoru Takeuchi
2017-10-16 13:44 ` David Sterba
0 siblings, 2 replies; 3+ messages in thread
From: Anand Jain @ 2017-10-14 0:35 UTC (permalink / raw)
To: linux-btrfs
At few places we could use BLK_STS_OK and BLK_STS_NOSUPP.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
fs/btrfs/compression.c | 3 ++-
fs/btrfs/inode.c | 4 ++--
fs/btrfs/volumes.c | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index b51d23f5cafa..43d4b51556ec 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -239,7 +239,8 @@ static void end_compressed_bio_write(struct bio *bio)
cb->start,
cb->start + cb->len - 1,
NULL,
- bio->bi_status ? 0 : 1);
+ bio->bi_status ?
+ BLK_STS_OK : BLK_STS_NOTSUPP);
cb->compressed_pages[0]->mapping = NULL;
end_compressed_writeback(inode, cb);
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 128f3e58634f..9aa03c89ad86 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -8360,7 +8360,7 @@ static void btrfs_endio_direct_read(struct bio *bio)
if (dip->flags & BTRFS_DIO_ORIG_BIO_SUBMITTED) {
err = btrfs_subio_endio_read(inode, io_bio, err);
if (!err)
- bio->bi_status = 0;
+ bio->bi_status = BLK_STS_OK;
}
unlock_extent(&BTRFS_I(inode)->io_tree, dip->logical_offset,
@@ -8478,7 +8478,7 @@ static void btrfs_end_dio_bio(struct bio *bio)
if (dip->errors) {
bio_io_error(dip->orig_bio);
} else {
- dip->dio_bio->bi_status = 0;
+ dip->dio_bio->bi_status = BLK_STS_OK;
bio_endio(dip->orig_bio);
}
out:
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index a61405c2cd31..15e017af756c 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -6020,7 +6020,7 @@ static void btrfs_end_bio(struct bio *bio)
* this bio is actually up to date, we didn't
* go over the max number of errors
*/
- bio->bi_status = 0;
+ bio->bi_status = BLK_STS_OK;
}
btrfs_end_bbio(bbio, bio);
--
2.13.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] btrfs: use BLK_STS defines where needed
2017-10-14 0:35 [PATCH] btrfs: use BLK_STS defines where needed Anand Jain
@ 2017-10-14 15:06 ` Satoru Takeuchi
2017-10-16 13:44 ` David Sterba
1 sibling, 0 replies; 3+ messages in thread
From: Satoru Takeuchi @ 2017-10-14 15:06 UTC (permalink / raw)
To: Anand Jain; +Cc: linux-btrfs
At Sat, 14 Oct 2017 08:35:56 +0800,
Anand Jain wrote:
>
> At few places we could use BLK_STS_OK and BLK_STS_NOSUPP.
>
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Satoru Taekeuchi <satoru.takeuchi@gmail.com>
> ---
> fs/btrfs/compression.c | 3 ++-
> fs/btrfs/inode.c | 4 ++--
> fs/btrfs/volumes.c | 2 +-
> 3 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
> index b51d23f5cafa..43d4b51556ec 100644
> --- a/fs/btrfs/compression.c
> +++ b/fs/btrfs/compression.c
> @@ -239,7 +239,8 @@ static void end_compressed_bio_write(struct bio *bio)
> cb->start,
> cb->start + cb->len - 1,
> NULL,
> - bio->bi_status ? 0 : 1);
> + bio->bi_status ?
> + BLK_STS_OK : BLK_STS_NOTSUPP);
> cb->compressed_pages[0]->mapping = NULL;
>
> end_compressed_writeback(inode, cb);
> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
> index 128f3e58634f..9aa03c89ad86 100644
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@ -8360,7 +8360,7 @@ static void btrfs_endio_direct_read(struct bio *bio)
> if (dip->flags & BTRFS_DIO_ORIG_BIO_SUBMITTED) {
> err = btrfs_subio_endio_read(inode, io_bio, err);
> if (!err)
> - bio->bi_status = 0;
> + bio->bi_status = BLK_STS_OK;
> }
>
> unlock_extent(&BTRFS_I(inode)->io_tree, dip->logical_offset,
> @@ -8478,7 +8478,7 @@ static void btrfs_end_dio_bio(struct bio *bio)
> if (dip->errors) {
> bio_io_error(dip->orig_bio);
> } else {
> - dip->dio_bio->bi_status = 0;
> + dip->dio_bio->bi_status = BLK_STS_OK;
> bio_endio(dip->orig_bio);
> }
> out:
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index a61405c2cd31..15e017af756c 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -6020,7 +6020,7 @@ static void btrfs_end_bio(struct bio *bio)
> * this bio is actually up to date, we didn't
> * go over the max number of errors
> */
> - bio->bi_status = 0;
> + bio->bi_status = BLK_STS_OK;
> }
>
> btrfs_end_bbio(bbio, bio);
> --
> 2.13.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] btrfs: use BLK_STS defines where needed
2017-10-14 0:35 [PATCH] btrfs: use BLK_STS defines where needed Anand Jain
2017-10-14 15:06 ` Satoru Takeuchi
@ 2017-10-16 13:44 ` David Sterba
1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2017-10-16 13:44 UTC (permalink / raw)
To: Anand Jain; +Cc: linux-btrfs
On Sat, Oct 14, 2017 at 08:35:56AM +0800, Anand Jain wrote:
> At few places we could use BLK_STS_OK and BLK_STS_NOSUPP.
>
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
> fs/btrfs/compression.c | 3 ++-
> fs/btrfs/inode.c | 4 ++--
> fs/btrfs/volumes.c | 2 +-
> 3 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
> index b51d23f5cafa..43d4b51556ec 100644
> --- a/fs/btrfs/compression.c
> +++ b/fs/btrfs/compression.c
> @@ -239,7 +239,8 @@ static void end_compressed_bio_write(struct bio *bio)
> cb->start,
> cb->start + cb->len - 1,
> NULL,
> - bio->bi_status ? 0 : 1);
> + bio->bi_status ?
> + BLK_STS_OK : BLK_STS_NOTSUPP);
> cb->compressed_pages[0]->mapping = NULL;
>
> end_compressed_writeback(inode, cb);
> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
> index 128f3e58634f..9aa03c89ad86 100644
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@ -8360,7 +8360,7 @@ static void btrfs_endio_direct_read(struct bio *bio)
> if (dip->flags & BTRFS_DIO_ORIG_BIO_SUBMITTED) {
> err = btrfs_subio_endio_read(inode, io_bio, err);
> if (!err)
> - bio->bi_status = 0;
> + bio->bi_status = BLK_STS_OK;
This hunk does not apply to current devel queue (ie. something close to
for-next), dropped and applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-16 13:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-14 0:35 [PATCH] btrfs: use BLK_STS defines where needed Anand Jain
2017-10-14 15:06 ` Satoru Takeuchi
2017-10-16 13:44 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).