On Fri, Apr 15, 2022 at 10:23 AM Xuan Zhuo wrote:
>
> On Thu, 14 Apr 2022 17:30:02 +0800, Jason Wang wrote:
> > On Wed, Apr 13, 2022 at 4:47 PM Xuan Zhuo
> > wrote:
> > >
> > > On Wed, 13 Apr 2022 16:00:18 +0800, Jason Wang
> > > wrote:
> > > >
> > > > 在 2022/4/6 上午11:43, Xuan Zhuo 写道:
> > >
Randomly poking into block device internals for manual prefetches isn't
exactly a very maintainable thing to do. And none of the performance
criticil direct I/O implementations still use this library function
anyway, so just drop it.
Signed-off-by: Christoph Hellwig
---
fs/direct-io.c | 32
Secure erase is a very different operation from discard in that it is
a data integrity operation vs hint. Fully split the limits and helper
infrastructure to make the separation more clear.
Signed-off-by: Christoph Hellwig
Reviewed-by: Martin K. Petersen
Acked-by: Christoph Böhmwalder [drbd]
A
Abstract away implementation details from file systems by providing a
block_device based helper to retrieve the discard granularity.
Signed-off-by: Christoph Hellwig
Reviewed-by: Martin K. Petersen
Acked-by: Christoph Böhmwalder [drbd]
Acked-by: Ryusuke Konishi
Acked-by: David Sterba [btrfs]
Just use a non-zero max_discard_sectors as an indicator for discard
support, similar to what is done for write zeroes.
The only places where needs special attention is the RAID5 driver,
which must clear discard support for security reasons by default,
even if the default stacking rules would allow
Add a helper to query the number of sectors support per each discard bio
based on the block device and use this helper to stop various places from
poking into the request_queue to see if discard is supported and if so how
much. This mirrors what is done e.g. for write zeroes as well.
Signed-off-b
Move all the logic to limit the discard bio size into a common helper
so that it is better documented.
Signed-off-by: Christoph Hellwig
Reviewed-by: Martin K. Petersen
Acked-by: Coly Li
---
block/blk-lib.c | 59 -
block/blk.h | 14 ---
No need to inline these fairly larger helpers. Also fix the return value
to be unsigned, just like the field in struct queue_limits.
Signed-off-by: Christoph Hellwig
Reviewed-by: Martin K. Petersen
---
block/blk-settings.c | 35 +++
include/linux/blkdev.h | 34
Use the bdev based alignment helper instead of open coding it.
Signed-off-by: Christoph Hellwig
Reviewed-by: Martin K. Petersen
---
block/partitions/core.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/block/partitions/core.c b/block/partitions/core.c
index 240b3fff52
Just use bdev_alignment_offset in disk_discard_alignment_show instead.
That helpers is the same except for an always false branch that doesn't
matter in this slow path.
Signed-off-by: Christoph Hellwig
Reviewed-by: Martin K. Petersen
---
block/genhd.c | 2 +-
include/linux/blkdev.h | 8
No need to inline these fairly larger helpers.
Signed-off-by: Christoph Hellwig
Reviewed-by: Martin K. Petersen
---
block/blk-settings.c | 23 +++
include/linux/blkdev.h | 21 +
2 files changed, 24 insertions(+), 20 deletions(-)
diff --git a/block/blk-
This does the same as the open coded variant except for an extra branch,
and allows to remove queue_alignment_offset entirely.
Signed-off-by: Christoph Hellwig
Reviewed-by: Martin K. Petersen
---
block/genhd.c | 2 +-
include/linux/blkdev.h | 8
2 files changed, 1 insertion(+)
Replace the open coded offset calculation with the proper helper.
This is an ABI change in that the -1 for a misaligned partition is
properly propagated, which can be considered a bug fix and matches
what is done on the whole device.
Signed-off-by: Christoph Hellwig
Reviewed-by: Martin K. Peterse
Add a helper to check the max supported sectors for zone append based on
the block_device instead of having to poke into the block layer internal
request_queue.
Signed-off-by: Christoph Hellwig
Acked-by: Damien Le Moal
Reviewed-by: Martin K. Petersen
Reviewed-by: Johannes Thumshirn
---
driver
Add a helper to check the stable writes flag based on the block_device
instead of having to poke into the block layer internal request_queue.
Signed-off-by: Christoph Hellwig
Reviewed-by: Martin K. Petersen
---
drivers/md/dm-table.c | 4 +---
fs/super.c | 2 +-
include/linux/blkdev
Add a helper to check the FUA flag based on the block_device instead of
having to poke into the block layer internal request_queue.
Signed-off-by: Christoph Hellwig
Reviewed-by: Martin K. Petersen
---
drivers/block/rnbd/rnbd-srv.c | 3 +--
drivers/target/target_core_iblock.c | 3 +--
fs/i
Add a helper to check the write cache flag based on the block_device
instead of having to poke into the block layer internal request_queue.
Signed-off-by: Christoph Hellwig
Reviewed-by: Martin K. Petersen
Acked-by: David Sterba [btrfs]
---
drivers/block/rnbd/rnbd-srv.c | 2 +-
drivers/bl
Add a helper to check the nonrot flag based on the block_device instead
of having to poke into the block layer internal request_queue.
Signed-off-by: Christoph Hellwig
Reviewed-by: Martin K. Petersen
Acked-by: David Sterba [btrfs]
---
block/ioctl.c | 2 +-
drivers/block/l
Use the bdev based helper instead of poking into the queue.
Signed-off-by: Christoph Hellwig
---
mm/swapfile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 63c61f8b26118..4c7537162af5e 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -2
Signed-off-by: Christoph Hellwig
Reviewed-by: Johannes Thumshirn
---
fs/ntfs3/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
index 278dcf5024102..cd30e81abbce0 100644
--- a/fs/ntfs3/super.c
+++ b/fs/ntfs3/super.c
@@ -920,7 +920,7 @
Signed-off-by: Christoph Hellwig
Reviewed-by: Johannes Thumshirn
Acked-by: David Sterba
---
fs/btrfs/zoned.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
index 1b1b310c3c510..f72cad7391a11 100644
--- a/fs/btrfs/zoned.c
+++ b/fs/btrfs/
Sanitize the calling conventions and use a goto label to cleanup the
code flow.
Signed-off-by: Christoph Hellwig
Acked-by: Christoph Böhmwalder
---
drivers/block/drbd/drbd_nl.c | 68 +++-
1 file changed, 35 insertions(+), 33 deletions(-)
diff --git a/drivers/blo
The bdev version does the right thing for partitions, so use that.
Fixes: 9104d31a759f ("drbd: introduce WRITE_SAME support")
Signed-off-by: Christoph Hellwig
Acked-by: Christoph Böhmwalder
---
drivers/block/drbd/drbd_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dr
Use the bdev based limits helpers where they exist.
Signed-off-by: Christoph Hellwig
Acked-by: Christoph Böhmwalder
---
drivers/block/drbd/drbd_main.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
Fold each branch into its only caller.
Signed-off-by: Christoph Hellwig
Acked-by: Christoph Böhmwalder
---
drivers/block/drbd/drbd_main.c | 47 +++---
1 file changed, 20 insertions(+), 27 deletions(-)
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/
Use the proper bdev_discard_alignment helper that accounts for partition
offsets.
Fixes: c66ac9db8d4a ("[SCSI] target: Add LIO target core v4.0.0-rc6")
Signed-off-by: Christoph Hellwig
Reviewed-by: Martin K. Petersen
---
drivers/target/target_core_device.c | 4 ++--
1 file changed, 2 insertions
The SCSI target drivers is a consumer of the block layer and shoul
d generally work on struct block_device.
Signed-off-by: Christoph Hellwig
Reviewed-by: Martin K. Petersen
---
drivers/target/target_core_device.c | 5 +++--
drivers/target/target_core_file.c| 7 ---
drivers/target/targe
Hi Jens,
this series cleanups up the block layer API so that APIs consumed
by file systems are (almost) only struct block_devic based, so that
file systems don't have to poke into block layer internals like the
request_queue.
I also found a bunch of existing bugs related to partition offsets
and
For block devices, the SCSI target drivers implements UNMAP as calls to
blkdev_issue_discard, which does not guarantee zeroing just because
Write Zeroes is supported.
Note that this does not affect the file backed path which uses
fallocate to punch holes.
Fixes: 2237498f0b5c ("target/iblock: Conv
On Thu, 14 Apr 2022 17:30:02 +0800, Jason Wang wrote:
> On Wed, Apr 13, 2022 at 4:47 PM Xuan Zhuo wrote:
> >
> > On Wed, 13 Apr 2022 16:00:18 +0800, Jason Wang wrote:
> > >
> > > 在 2022/4/6 上午11:43, Xuan Zhuo 写道:
> > > > This patch implements the resize function of the rx, tx queues.
> > > > Bas
On April 14, 2022 1:41:38 PM PDT, Rob Herring wrote:
>On Thu, Apr 14, 2022 at 12:38:49AM +0200, Jason A. Donenfeld wrote:
>> Hi Rob,
>>
>> On Wed, Apr 13, 2022 at 4:32 PM Rob Herring wrote:
>> > 'does not have a usable get_cycles(), ...' as clearly some arches have
>> > get_cycles() and yet stil
On Thu, Apr 14, 2022 at 12:38:49AM +0200, Jason A. Donenfeld wrote:
> Hi Rob,
>
> On Wed, Apr 13, 2022 at 4:32 PM Rob Herring wrote:
> > 'does not have a usable get_cycles(), ...' as clearly some arches have
> > get_cycles() and yet still need a fallback.
> >
> > Why not handle the 'if get_cycles
Hi Russell,
On Thu, Apr 14, 2022 at 12:12 PM Russell King (Oracle)
wrote:
> I'm surprised this didn't trigger checkpatch to warn. From
> coding-style:
>
> 6.1) Function prototypes
> Do not use the ``extern`` keyword with function declarations as this makes
> lines longer and isn't strictly necess
Enable ARCH_HAS_GCOV_PROFILE_ALL so that CONFIG_GCOV_PROFILE_ALL can be
selected on UML. I didn't need to explicitly disable GCOV on anything
to get this to work on the configs I tested.
Signed-off-by: Vincent Whitchurch
---
arch/um/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/ar
On Wed, Apr 06, 2022 at 03:08:16PM +0200, Jonathan Cameron wrote:
> On Tue, 5 Apr 2022 15:48:05 +0200
> Vincent Whitchurch wrote:
> I messed around the other day with writing tests for
> drivers/staging/iio/cdc/ad7746.c and wasn't "too bad" and was useful for
> verifying some refactoring (and iden
On Wed, Apr 13, 2022 at 01:54:01PM +0200, Jason A. Donenfeld wrote:
> The addition of random_get_entropy_fallback() provides access to
> whichever time source has the highest frequency, which is useful for
> gathering entropy on platforms without available cycle counters. It's
> not necessarily as
On Thu, Apr 14, 2022 at 2:25 PM Xuan Zhuo wrote:
>
> On Tue, 12 Apr 2022 14:58:19 +0800, Jason Wang wrote:
> >
> > 在 2022/4/6 上午11:43, Xuan Zhuo 写道:
> > > Introduce vp_active_vq() to configure vring to backend after vq attach
> > > vring. And configure vq vector if necessary.
> > >
> > > Signed-o
On Wed, Apr 13, 2022 at 4:47 PM Xuan Zhuo wrote:
>
> On Wed, 13 Apr 2022 16:00:18 +0800, Jason Wang wrote:
> >
> > 在 2022/4/6 上午11:43, Xuan Zhuo 写道:
> > > This patch implements the resize function of the rx, tx queues.
> > > Based on this function, it is possible to modify the ring num of the
> >
Hi Maciej,
On Thu, Apr 14, 2022 at 02:16:18AM +0100, Maciej W. Rozycki wrote:
> Yes, for the relevant CPUs the range is 63-8 << 8 for R3k machines and
> 47-0 (the lower bound can be higher if wired entries are used, which I
> think we occasionally do) for R4k machines with a buggy CP0 counter.
On Wed, Apr 13, 2022 at 11:26 AM Xuan Zhuo wrote:
>
> On Tue, 12 Apr 2022 14:28:24 +0800, Jason Wang wrote:
> >
> > 在 2022/4/6 上午11:43, Xuan Zhuo 写道:
> > > Separate the logic of packed to create vring queue.
> > >
> > > For the convenience of passing parameters, add a structure
> > > vring_packed
On Wed, Apr 13, 2022 at 11:23 AM Xuan Zhuo wrote:
>
> On Tue, 12 Apr 2022 15:07:58 +0800, Jason Wang wrote:
> >
> > 在 2022/4/6 上午11:43, Xuan Zhuo 写道:
> > > This patch implements virtio pci support for QUEUE RESET.
> > >
> > > Performing reset on a queue is divided into these steps:
> > >
> > >
On Wed, Apr 13, 2022 at 10:30 AM Xuan Zhuo wrote:
>
> On Tue, 12 Apr 2022 10:41:03 +0800, Jason Wang wrote:
> >
> > 在 2022/4/6 上午11:43, Xuan Zhuo 写道:
> > > Record the maximum queue num supported by the device.
> > >
> > > virtio-net can display the maximum (supported by hardware) ring size in
> >
42 matches
Mail list logo