Re: [PATCH 02/14] drbd: remove dead code in device_to_statistics

2020-07-28 Thread Johannes Thumshirn
Looks good,
Reviewed-by: Johannes Thumshirn 


[PATCH 02/14] drbd: remove dead code in device_to_statistics

2020-07-26 Thread Christoph Hellwig
Ever since the switch to blk-mq, a lower device not used for VM
writeback will not be marked congested, so the check will never
trigger.

Signed-off-by: Christoph Hellwig 
---
 drivers/block/drbd/drbd_nl.c | 6 --
 1 file changed, 6 deletions(-)

diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index d0d9a549b58388..650372ee2c7822 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -3370,7 +3370,6 @@ static void device_to_statistics(struct device_statistics 
*s,
if (get_ldev(device)) {
struct drbd_md *md = >ldev->md;
u64 *history_uuids = (u64 *)s->history_uuids;
-   struct request_queue *q;
int n;
 
spin_lock_irq(>uuid_lock);
@@ -3384,11 +3383,6 @@ static void device_to_statistics(struct 
device_statistics *s,
spin_unlock_irq(>uuid_lock);
 
s->dev_disk_flags = md->flags;
-   q = bdev_get_queue(device->ldev->backing_bdev);
-   s->dev_lower_blocked =
-   bdi_congested(q->backing_dev_info,
- (1 << WB_async_congested) |
- (1 << WB_sync_congested));
put_ldev(device);
}
s->dev_size = drbd_get_capacity(device->this_bdev);
-- 
2.27.0



[PATCH 02/14] drbd: remove dead code in device_to_statistics

2020-07-24 Thread Christoph Hellwig
Ever since the switch to blk-mq, a lower device not used for VM
writeback will not be marked congested, so the check will never
trigger.

Signed-off-by: Christoph Hellwig 
---
 drivers/block/drbd/drbd_nl.c | 6 --
 1 file changed, 6 deletions(-)

diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index d0d9a549b58388..650372ee2c7822 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -3370,7 +3370,6 @@ static void device_to_statistics(struct device_statistics 
*s,
if (get_ldev(device)) {
struct drbd_md *md = >ldev->md;
u64 *history_uuids = (u64 *)s->history_uuids;
-   struct request_queue *q;
int n;
 
spin_lock_irq(>uuid_lock);
@@ -3384,11 +3383,6 @@ static void device_to_statistics(struct 
device_statistics *s,
spin_unlock_irq(>uuid_lock);
 
s->dev_disk_flags = md->flags;
-   q = bdev_get_queue(device->ldev->backing_bdev);
-   s->dev_lower_blocked =
-   bdi_congested(q->backing_dev_info,
- (1 << WB_async_congested) |
- (1 << WB_sync_congested));
put_ldev(device);
}
s->dev_size = drbd_get_capacity(device->this_bdev);
-- 
2.27.0



Re: [PATCH 02/14] drbd: remove dead code in device_to_statistics

2020-07-22 Thread Johannes Thumshirn
On 22/07/2020 09:07, Christoph Hellwig wrote:
> As far as I can tell this is a netlink user ABI.
> 

I guess it has to stay then


Re: [PATCH 02/14] drbd: remove dead code in device_to_statistics

2020-07-22 Thread Christoph Hellwig
On Wed, Jul 22, 2020 at 07:03:21AM +, Johannes Thumshirn wrote:
> On 22/07/2020 08:28, Christoph Hellwig wrote:
> > Ever since the switch to blk-mq, a lower device not use by VM
>in-use/used? ~^

Yeah, this should be used.

> Also this looks like the last user of 'dev_lower_blocked' so it could
> be removed from device_statistics if it's not an ABI (not sure with this
> netlink stuff).

As far as I can tell this is a netlink user ABI.


Re: [PATCH 02/14] drbd: remove dead code in device_to_statistics

2020-07-22 Thread Johannes Thumshirn
On 22/07/2020 08:28, Christoph Hellwig wrote:
> Ever since the switch to blk-mq, a lower device not use by VM
   in-use/used? ~^

Also this looks like the last user of 'dev_lower_blocked' so it could
be removed from device_statistics if it's not an ABI (not sure with this
netlink stuff).


[PATCH 02/14] drbd: remove dead code in device_to_statistics

2020-07-22 Thread Christoph Hellwig
Ever since the switch to blk-mq, a lower device not use by VM
writeback will not be marked congested, so the check will never
trigger.

Signed-off-by: Christoph Hellwig 
---
 drivers/block/drbd/drbd_nl.c | 6 --
 1 file changed, 6 deletions(-)

diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index d0d9a549b58388..650372ee2c7822 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -3370,7 +3370,6 @@ static void device_to_statistics(struct device_statistics 
*s,
if (get_ldev(device)) {
struct drbd_md *md = >ldev->md;
u64 *history_uuids = (u64 *)s->history_uuids;
-   struct request_queue *q;
int n;
 
spin_lock_irq(>uuid_lock);
@@ -3384,11 +3383,6 @@ static void device_to_statistics(struct 
device_statistics *s,
spin_unlock_irq(>uuid_lock);
 
s->dev_disk_flags = md->flags;
-   q = bdev_get_queue(device->ldev->backing_bdev);
-   s->dev_lower_blocked =
-   bdi_congested(q->backing_dev_info,
- (1 << WB_async_congested) |
- (1 << WB_sync_congested));
put_ldev(device);
}
s->dev_size = drbd_get_capacity(device->this_bdev);
-- 
2.27.0



[PATCH 02/14] drbd: remove dead code in device_to_statistics

2020-07-20 Thread Christoph Hellwig
Ever since the switch to blk-mq, a lower device not use by VM
writeback will not be marked congested, so the check will never
trigger.

Signed-off-by: Christoph Hellwig 
---
 drivers/block/drbd/drbd_nl.c | 6 --
 1 file changed, 6 deletions(-)

diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index d0d9a549b58388..650372ee2c7822 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -3370,7 +3370,6 @@ static void device_to_statistics(struct device_statistics 
*s,
if (get_ldev(device)) {
struct drbd_md *md = >ldev->md;
u64 *history_uuids = (u64 *)s->history_uuids;
-   struct request_queue *q;
int n;
 
spin_lock_irq(>uuid_lock);
@@ -3384,11 +3383,6 @@ static void device_to_statistics(struct 
device_statistics *s,
spin_unlock_irq(>uuid_lock);
 
s->dev_disk_flags = md->flags;
-   q = bdev_get_queue(device->ldev->backing_bdev);
-   s->dev_lower_blocked =
-   bdi_congested(q->backing_dev_info,
- (1 << WB_async_congested) |
- (1 << WB_sync_congested));
put_ldev(device);
}
s->dev_size = drbd_get_capacity(device->this_bdev);
-- 
2.27.0