* Re: [PATCH 05/25] fs: Get proper reference for s_bdi
From: Christoph Hellwig @ 2017-04-12 8:09 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-fsdevel, linux-block, Christoph Hellwig
In-Reply-To: <20170329105623.18241-6-jack@suse.cz>
Looks fine,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* Re: [PATCH 06/25] lustre: Convert to separately allocated bdi
From: Christoph Hellwig @ 2017-04-12 8:10 UTC (permalink / raw)
To: Jan Kara
Cc: linux-fsdevel, linux-block, Christoph Hellwig, Oleg Drokin,
Andreas Dilger, James Simmons, lustre-devel
In-Reply-To: <20170329105623.18241-7-jack@suse.cz>
Looks fine,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* Re: [PATCH 07/25] 9p: Convert to separately allocated bdi
From: Christoph Hellwig @ 2017-04-12 8:10 UTC (permalink / raw)
To: Jan Kara
Cc: linux-fsdevel, linux-block, Christoph Hellwig,
Eric Van Hensbergen, Ron Minnich, Latchesar Ionkov,
v9fs-developer
In-Reply-To: <20170329105623.18241-8-jack@suse.cz>
Looks fine,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* Re: [PATCH 08/25] btrfs: Convert to separately allocated bdi
From: Christoph Hellwig @ 2017-04-12 8:10 UTC (permalink / raw)
To: Jan Kara
Cc: linux-fsdevel, linux-block, Christoph Hellwig, Chris Mason,
Josef Bacik, David Sterba, linux-btrfs
In-Reply-To: <20170329105623.18241-9-jack@suse.cz>
Looks fine,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* Re: [PATCH 09/25] ceph: Convert to separately allocated bdi
From: Christoph Hellwig @ 2017-04-12 8:11 UTC (permalink / raw)
To: Jan Kara
Cc: linux-fsdevel, linux-block, Christoph Hellwig, Ilya Dryomov,
Yan, Zheng, Sage Weil, ceph-devel
In-Reply-To: <20170329105623.18241-10-jack@suse.cz>
Looks fine,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* Re: [PATCH 10/25] cifs: Convert to separately allocated bdi
From: Christoph Hellwig @ 2017-04-12 8:11 UTC (permalink / raw)
To: Jan Kara
Cc: linux-fsdevel, linux-block, Christoph Hellwig, Steve French,
linux-cifs
In-Reply-To: <20170329105623.18241-11-jack@suse.cz>
Looks fine,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* Re: [PATCH 11/25] ecryptfs: Convert to separately allocated bdi
From: Christoph Hellwig @ 2017-04-12 8:11 UTC (permalink / raw)
To: Jan Kara
Cc: linux-fsdevel, linux-block, Christoph Hellwig, Tyler Hicks,
ecryptfs
In-Reply-To: <20170329105623.18241-12-jack@suse.cz>
Looks fine,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* Re: [PATCH 12/25] afs: Convert to separately allocated bdi
From: Christoph Hellwig @ 2017-04-12 8:12 UTC (permalink / raw)
To: Jan Kara
Cc: linux-fsdevel, linux-block, Christoph Hellwig, David Howells,
linux-afs
In-Reply-To: <20170329105623.18241-13-jack@suse.cz>
Looks fine,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* Re: [PATCH 13/25] mtd: Convert to dynamically allocated bdi infrastructure
From: Christoph Hellwig @ 2017-04-12 8:14 UTC (permalink / raw)
To: Jan Kara
Cc: linux-fsdevel, linux-block, Christoph Hellwig, David Woodhouse,
Brian Norris, linux-mtd
In-Reply-To: <20170329105623.18241-14-jack@suse.cz>
> + sb->s_bdi = bdi_get(mtd_bdi);
> + sb->s_iflags |= SB_I_DYNBDI;
FTI, while I think this is a faithful conversion of the existing code,
the single bdi for all MTD devices looks rather bogus to me..
Otherwise this looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* Re: [PATCH 14/25] coda: Convert to separately allocated bdi
From: Christoph Hellwig @ 2017-04-12 8:14 UTC (permalink / raw)
To: Jan Kara
Cc: linux-fsdevel, linux-block, Christoph Hellwig, Jan Harkes, coda,
codalist
In-Reply-To: <20170329105623.18241-15-jack@suse.cz>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* Re: [PATCH 15/25] exofs: Convert to separately allocated bdi
From: Christoph Hellwig @ 2017-04-12 8:14 UTC (permalink / raw)
To: Jan Kara
Cc: linux-fsdevel, linux-block, Christoph Hellwig, Boaz Harrosh,
Benny Halevy
In-Reply-To: <20170329105623.18241-16-jack@suse.cz>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* Re: [PATCH 16/25] fuse: Convert to separately allocated bdi
From: Christoph Hellwig @ 2017-04-12 8:15 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-fsdevel, linux-block, Christoph Hellwig, Miklos Szeredi
In-Reply-To: <20170329105623.18241-17-jack@suse.cz>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* Re: [PATCH 17/25] fuse: Get rid of bdi_initialized
From: Christoph Hellwig @ 2017-04-12 8:15 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-fsdevel, linux-block, Christoph Hellwig, Miklos Szeredi
In-Reply-To: <20170329105623.18241-18-jack@suse.cz>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* Re: [PATCH 18/25] gfs2: Convert to properly refcounting bdi
From: Christoph Hellwig @ 2017-04-12 8:16 UTC (permalink / raw)
To: Jan Kara
Cc: linux-fsdevel, linux-block, Christoph Hellwig, Steven Whitehouse,
Bob Peterson, cluster-devel
In-Reply-To: <20170329105623.18241-19-jack@suse.cz>
On Wed, Mar 29, 2017 at 12:56:16PM +0200, Jan Kara wrote:
> Similarly to set_bdev_super() GFS2 just used block device reference to
> bdi. Convert it to properly getting bdi reference. The reference will
> get automatically dropped on superblock destruction.
Hmm, why iisn't gfs2 simply using the generic mount_bdev code?
Otherwise looks fine:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* Re: [PATCH 19/25] nilfs2: Convert to properly refcounting bdi
From: Christoph Hellwig @ 2017-04-12 8:17 UTC (permalink / raw)
To: Jan Kara
Cc: linux-fsdevel, linux-block, Christoph Hellwig, Ryusuke Konishi,
linux-nilfs
In-Reply-To: <20170329105623.18241-20-jack@suse.cz>
On Wed, Mar 29, 2017 at 12:56:17PM +0200, Jan Kara wrote:
> Similarly to set_bdev_super() NILFS2 just used block device reference to
> bdi. Convert it to properly getting bdi reference. The reference will
> get automatically dropped on superblock destruction.
I really wish we could get rid of this open coding in block based
file systems..
Otherwise looks fine:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* Re: [PATCH 20/25] ncpfs: Convert to separately allocated bdi
From: Christoph Hellwig @ 2017-04-12 8:18 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-fsdevel, linux-block, Christoph Hellwig, Petr Vandrovec
In-Reply-To: <20170329105623.18241-21-jack@suse.cz>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* Re: [PATCH 21/25] nfs: Convert to separately allocated bdi
From: Christoph Hellwig @ 2017-04-12 8:20 UTC (permalink / raw)
To: Jan Kara
Cc: linux-fsdevel, linux-block, Christoph Hellwig, Trond Myklebust,
Anna Schumaker, linux-nfs
In-Reply-To: <20170329105623.18241-22-jack@suse.cz>
> /*
> * Finish setting up an NFS2/3 superblock
> */
I was just looking why you didn't update the v4 variant, but it seems
like the comment above is simply incorrect..
Thus the patch looks fine:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* Re: [PATCH 22/25] ubifs: Convert to separately allocated bdi
From: Christoph Hellwig @ 2017-04-12 8:20 UTC (permalink / raw)
To: Jan Kara
Cc: linux-fsdevel, linux-block, Christoph Hellwig, Richard Weinberger,
Artem Bityutskiy, Adrian Hunter, linux-mtd
In-Reply-To: <20170329105623.18241-23-jack@suse.cz>
Looks fine,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* Re: [PATCH 23/25] fs: Remove SB_I_DYNBDI flag
From: Christoph Hellwig @ 2017-04-12 8:21 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-fsdevel, linux-block, Christoph Hellwig
In-Reply-To: <20170329105623.18241-24-jack@suse.cz>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* Re: [PATCH 24/25] block: Remove unused functions
From: Christoph Hellwig @ 2017-04-12 8:21 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-fsdevel, linux-block, Christoph Hellwig
In-Reply-To: <20170329105623.18241-25-jack@suse.cz>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* Re: [PATCH 25/25] bdi: Drop 'parent' argument from bdi_register[_va]()
From: Christoph Hellwig @ 2017-04-12 8:21 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-fsdevel, linux-block, Christoph Hellwig
In-Reply-To: <20170329105623.18241-26-jack@suse.cz>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* [PATCH] block: Make writeback throttling defaults consistent for SQ devices
From: Jan Kara @ 2017-04-12 8:23 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block, Jan Kara
When CFQ is used as an elevator, it disables writeback throttling
because they don't play well together. Later when a different elevator
is chosen for the device, writeback throttling doesn't get enabled
again as it should. Add support to NOOP and DEADLINE elevators to enable
writeback throttling if user set such defaults.
Signed-off-by: Jan Kara <jack@suse.cz>
---
block/blk-sysfs.c | 19 +------------------
block/blk-wbt.c | 24 ++++++++++++++++++++++++
block/blk-wbt.h | 4 ++++
block/deadline-iosched.c | 7 +++++++
block/noop-iosched.c | 7 +++++++
5 files changed, 43 insertions(+), 18 deletions(-)
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index fc20489f0d2b..f85723332288 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -844,23 +844,6 @@ struct kobj_type blk_queue_ktype = {
.release = blk_release_queue,
};
-static void blk_wb_init(struct request_queue *q)
-{
-#ifndef CONFIG_BLK_WBT_MQ
- if (q->mq_ops)
- return;
-#endif
-#ifndef CONFIG_BLK_WBT_SQ
- if (q->request_fn)
- return;
-#endif
-
- /*
- * If this fails, we don't get throttling
- */
- wbt_init(q);
-}
-
int blk_register_queue(struct gendisk *disk)
{
int ret;
@@ -908,7 +891,7 @@ int blk_register_queue(struct gendisk *disk)
kobject_uevent(&q->kobj, KOBJ_ADD);
- blk_wb_init(q);
+ wbt_enable_default(q);
blk_throtl_register_queue(q);
diff --git a/block/blk-wbt.c b/block/blk-wbt.c
index b3b79149d3a0..22fb33cc35f1 100644
--- a/block/blk-wbt.c
+++ b/block/blk-wbt.c
@@ -665,6 +665,30 @@ void wbt_disable_default(struct request_queue *q)
}
EXPORT_SYMBOL_GPL(wbt_disable_default);
+/*
+ * Enable wbt if defaults are configured that way
+ */
+void wbt_enable_default(struct request_queue *q)
+{
+ if (q->rq_wb)
+ return;
+
+#ifndef CONFIG_BLK_WBT_MQ
+ if (q->mq_ops)
+ return;
+#endif
+#ifndef CONFIG_BLK_WBT_SQ
+ if (q->request_fn)
+ return;
+#endif
+
+ /*
+ * If this fails, we don't get throttling
+ */
+ wbt_init(q);
+}
+EXPORT_SYMBOL_GPL(wbt_enable_default);
+
u64 wbt_default_latency_nsec(struct request_queue *q)
{
/*
diff --git a/block/blk-wbt.h b/block/blk-wbt.h
index ad6c78507c3a..df6de50c5d59 100644
--- a/block/blk-wbt.h
+++ b/block/blk-wbt.h
@@ -117,6 +117,7 @@ void wbt_update_limits(struct rq_wb *);
void wbt_requeue(struct rq_wb *, struct blk_issue_stat *);
void wbt_issue(struct rq_wb *, struct blk_issue_stat *);
void wbt_disable_default(struct request_queue *);
+void wbt_enable_default(struct request_queue *);
void wbt_set_queue_depth(struct rq_wb *, unsigned int);
void wbt_set_write_cache(struct rq_wb *, bool);
@@ -155,6 +156,9 @@ static inline void wbt_issue(struct rq_wb *rwb, struct blk_issue_stat *stat)
static inline void wbt_disable_default(struct request_queue *q)
{
}
+static inline void wbt_enable_default(struct request_queue *q)
+{
+}
static inline void wbt_set_queue_depth(struct rq_wb *rwb, unsigned int depth)
{
}
diff --git a/block/deadline-iosched.c b/block/deadline-iosched.c
index c68f6bbc0dcd..71210b66f019 100644
--- a/block/deadline-iosched.c
+++ b/block/deadline-iosched.c
@@ -13,6 +13,7 @@
#include <linux/init.h>
#include <linux/compiler.h>
#include <linux/rbtree.h>
+#include "blk-wbt.h"
/*
* See Documentation/block/deadline-iosched.txt
@@ -363,6 +364,11 @@ static int deadline_init_queue(struct request_queue *q, struct elevator_type *e)
return 0;
}
+static void deadline_registered_queue(struct request_queue *q)
+{
+ wbt_enable_default(q);
+}
+
/*
* sysfs parts below
*/
@@ -445,6 +451,7 @@ static struct elevator_type iosched_deadline = {
.elevator_latter_req_fn = elv_rb_latter_request,
.elevator_init_fn = deadline_init_queue,
.elevator_exit_fn = deadline_exit_queue,
+ .elevator_registered_fn = deadline_registered_queue,
},
.elevator_attrs = deadline_attrs,
diff --git a/block/noop-iosched.c b/block/noop-iosched.c
index 2d1b15d89b45..92f747d6b9c2 100644
--- a/block/noop-iosched.c
+++ b/block/noop-iosched.c
@@ -7,6 +7,7 @@
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/init.h>
+#include "blk-wbt.h"
struct noop_data {
struct list_head queue;
@@ -91,6 +92,11 @@ static void noop_exit_queue(struct elevator_queue *e)
kfree(nd);
}
+static void noop_registered_queue(struct request_queue *q)
+{
+ wbt_enable_default(q);
+}
+
static struct elevator_type elevator_noop = {
.ops.sq = {
.elevator_merge_req_fn = noop_merged_requests,
@@ -100,6 +106,7 @@ static struct elevator_type elevator_noop = {
.elevator_latter_req_fn = noop_latter_request,
.elevator_init_fn = noop_init_queue,
.elevator_exit_fn = noop_exit_queue,
+ .elevator_registered_fn = noop_registered_queue,
},
.elevator_name = "noop",
.elevator_owner = THIS_MODULE,
--
2.12.0
^ permalink raw reply related
* Re: [PATCH 1/9] Use RWF_* flags for AIO operations
From: Christoph Hellwig @ 2017-04-12 8:33 UTC (permalink / raw)
To: Goldwyn Rodrigues
Cc: linux-fsdevel, jack, hch, linux-block, linux-btrfs, linux-ext4,
linux-xfs, sagi, avi, axboe, linux-api, willy, tom.leiming,
Goldwyn Rodrigues
In-Reply-To: <20170411142619.27205-2-rgoldwyn@suse.de>
>
> + if (unlikely(iocb->aio_rw_flags & ~(RWF_HIPRI | RWF_DSYNC | RWF_SYNC))) {
> + pr_debug("EINVAL: aio_rw_flags set with incompatible flags\n");
> + return -EINVAL;
> + }
> + if (iocb->aio_rw_flags & RWF_HIPRI)
> + req->common.ki_flags |= IOCB_HIPRI;
> + if (iocb->aio_rw_flags & RWF_DSYNC)
> + req->common.ki_flags |= IOCB_DSYNC;
> + if (iocb->aio_rw_flags & RWF_SYNC)
> + req->common.ki_flags |= (IOCB_DSYNC | IOCB_SYNC);
Pleae introduce a common helper to share this code between the
synchronous and the aio path
^ permalink raw reply
* Re: [PATCH 5/9] nowait aio: return on congested block device
From: Christoph Hellwig @ 2017-04-12 8:36 UTC (permalink / raw)
To: Goldwyn Rodrigues
Cc: linux-fsdevel, jack, hch, linux-block, linux-btrfs, linux-ext4,
linux-xfs, sagi, avi, axboe, linux-api, willy, tom.leiming,
Goldwyn Rodrigues
In-Reply-To: <20170411142619.27205-6-rgoldwyn@suse.de>
As mentioned last time around, this should be a REQ_NOWAIT flag so
that it can be easily passed down to the request layer.
> +static inline void bio_wouldblock_error(struct bio *bio)
> +{
> + bio->bi_error = -EAGAIN;
> + bio_endio(bio);
> +}
Please skip this helper..
> +#define QUEUE_FLAG_NOWAIT 28 /* queue supports BIO_NOWAIT */
Please make the flag name a little more descriptive, this sounds like
it will never wait.
^ permalink raw reply
* Re: [PATCH 9/9] nowait aio: Return -EOPNOTSUPP if filesystem does not support
From: Christoph Hellwig @ 2017-04-12 8:37 UTC (permalink / raw)
To: Goldwyn Rodrigues
Cc: linux-fsdevel, jack, hch, linux-block, linux-btrfs, linux-ext4,
linux-xfs, sagi, avi, axboe, linux-api, willy, tom.leiming,
Goldwyn Rodrigues
In-Reply-To: <20170411142619.27205-10-rgoldwyn@suse.de>
This should go into the patch that introduces IOCB_NOWAIT.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox