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
---
drivers/nvme/target/zns.c | 3 +--
fs/zonefs/super.c | 3 +--
include/linux/blkdev.h|
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
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
---
block/genhd.c | 2 +-
include/linux/blkdev.h | 8
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git
The bdev version does the right thing for partitions, so use that.
Fixes: 9104d31a759f ("drbd: introduce WRITE_SAME support")
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/drbd/drbd_main.c
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
---
block/blk-core.c| 2 +-
block/blk-lib.c
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.
Abstract away implementation details from file systems by providing a
block_device based helper to retreive the discard granularity.
Signed-off-by: Christoph Hellwig
---
block/blk-lib.c | 5 ++---
drivers/block/drbd/drbd_nl.c| 9 +
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
---
block/blk-lib.c | 59 -
block/blk.h | 14
2 files changed, 29 insertions(+), 44
Use the bdev based alignment helper instead of open coding it.
Signed-off-by: Christoph Hellwig
---
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 240b3fff521e4..70dec1c78521d 100644
---
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
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
---
block/genhd.c | 2 +-
include/linux/blkdev.h | 8
2 files changed, 1
Signed-off-by: Christoph Hellwig
---
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 b7b5fac1c7790..5b85004d85d6c 100644
--- a/fs/btrfs/zoned.c
+++ b/fs/btrfs/zoned.c
@@ -350,7 +350,6 @@ int
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 maches
what is done on the whole device.
Signed-off-by: Christoph Hellwig
---
block/partitions/core.c |
Use the proper bdev_discard_alignment helper that accounts for partition
offsets.
Fіxes: c66ac9db8d4a ("[SCSI] target: Add LIO target core v4.0.0-rc6")
Signed-off-by: Christoph Hellwig
---
drivers/target/target_core_device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
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
The target code is a consumer of the block layer and should generally
work on struct block_device.
Signed-off-by: Christoph Hellwig
---
drivers/target/target_core_device.c | 5 +++--
drivers/target/target_core_file.c| 7 ---
drivers/target/target_core_iblock.c | 2 +-
Sanitize the calling conventions and use a goto label to cleanup the
code flow.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_nl.c | 68 +++-
1 file changed, 35 insertions(+), 33 deletions(-)
diff --git a/drivers/block/drbd/drbd_nl.c
For block devices the target code 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: Convert
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
@@
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
---
block/blk-settings.c | 35 +++
include/linux/blkdev.h | 34
No need to inline these fairly larger helpers.
Signed-off-by: Christoph Hellwig
---
block/blk-settings.c | 23 +++
include/linux/blkdev.h | 21 +
2 files changed, 24 insertions(+), 20 deletions(-)
diff --git a/block/blk-settings.c
Fold each branch into its only caller.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_main.c | 50 --
1 file changed, 23 insertions(+), 27 deletions(-)
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index
Signed-off-by: Christoph Hellwig
---
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 @@ static int
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
---
drivers/block/rnbd/rnbd-srv.c | 2 +-
drivers/block/xen-blkback/xenbus.c | 2 +-
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
---
drivers/block/rnbd/rnbd-srv.c | 3 +--
drivers/target/target_core_iblock.c | 3 +--
fs/iomap/direct-io.c
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
---
drivers/md/dm-table.c | 4 +---
fs/super.c | 2 +-
include/linux/blkdev.h | 6 ++
mm/swapfile.c
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
---
block/ioctl.c | 2 +-
drivers/block/loop.c| 2 +-
drivers/md/dm-table.c
Use the bdev based limits helpers where they exist.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_main.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index
Looks good,
Reviewed-by: Johannes Thumshirn
Add the GL_NOPID flag for flock glock holders. Clean up the flag
setting code in do_flock.
In add_to_queue(), since flock glock holders now always have the
GL_NOPID flag set, there is no need to separately check for those types
of locks anymore.
Signed-off-by: Andreas Gruenbacher
---
In gfs2_before_commit(), use list_entry() instead of
list_prepare_entry() for letting the iterator variables
point at the list head.
Signed-off-by: Andreas Gruenbacher
---
fs/gfs2/lops.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
Add the GL_NOPID flag for the remaining glock holders which are not
associated with the current process.
Signed-off-by: Andreas Gruenbacher
---
fs/gfs2/inode.c | 7 +--
fs/gfs2/ops_fstype.c | 14 --
fs/gfs2/super.c | 3 ++-
fs/gfs2/util.c | 5 +++--
4 files
On Wed, Apr 6, 2022 at 8:07 AM Christoph Hellwig wrote:
>
> 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.
Add a GL_NOPID flag to indicate that a holder isn't associated with the
current process. This is useful for iopen glocks which are associated
with open files, as well as journal glock holders and similar which are
associated with the filesystem.
When the GL_NOPID flag is set, the pid and process
This patch unsets ls_remove_len and ls_remove_name if a message
allocation of a remove messages fails. In this case we never send a
remove message out but set the per ls ls_remove_len ls_remove_name
variable for a pending remove. Unset those variable should indicate
possible waiters in
This patch move the wake_up() call at the point when a remove message
completed. Before it was only when a remove message was going to be
sent. The possible waiter in wait_pending_remove() waits until a remove
is done if the resource name matches with the per ls variable
ls->ls_remove_name. If
binDrWrWim0Ob.bin
Description: Binary data
Hi,
this is a resend of Jakob Koschels list iterator patches rebased on
current pending dlm patches. We had a lot of change in the plock
handling of dlm.
*little change that lkb is named "big_lkb" to remain the "big lock"
information in variable name of function recover_lvb(). Otherwise it
binateKOcVhsJ.bin
Description: Binary data
binUcNTX2FULf.bin
Description: Binary data
binfJUed6s3zg.bin
Description: Binary data
bin3dBQMp5VYf.bin
Description: Binary data
binnqaImnDe2y.bin
Description: Binary data
binGyRuRd661N.bin
Description: Binary data
binsmMdxIT04t.bin
Description: Binary data
binF5G9FdBpNR.bin
Description: Binary data
binimcF0Q76lO.bin
Description: Binary data
bin0fHp90zR_b.bin
Description: Binary data
binWz8X8BV6fo.bin
Description: Binary data
bineCJNhU7lgH.bin
Description: Binary data
binnHZTpX67RY.bin
Description: Binary data
binS7sQtwPKHH.bin
Description: Binary data
binZfq0jKww0o.bin
Description: Binary data
bin8jrUzzFlWb.bin
Description: Binary data
binHsbO9EyDYd.bin
Description: Binary data
Christoph,
> 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.
Reviewed-by: Martin K. Petersen
--
Martin K. Petersen Oracle Linux Engineering
Christoph,
> 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.
Reviewed-by: Martin K. Petersen
--
Martin K. Petersen Oracle Linux Engineering
Christoph,
> 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.
Reviewed-by: Martin K. Petersen
--
Martin K. Petersen Oracle Linux Engineering
Christoph,
> Use the proper bdev_discard_alignment helper that accounts for partition
> offsets.
Reviewed-by: Martin K. Petersen
--
Martin K. Petersen Oracle Linux Engineering
Christoph,
> Use the bdev based alignment helper instead of open coding it.
Reviewed-by: Martin K. Petersen
--
Martin K. Petersen Oracle Linux Engineering
Christoph,
> 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.
Reviewed-by: Martin K. Petersen
--
Martin K. Petersen Oracle Linux Engineering
Christoph,
> Abstract away implementation details from file systems by providing a
> block_device based helper to retreive the discard granularity.
Reviewed-by: Martin K. Petersen
--
Martin K. Petersen Oracle Linux Engineering
Christoph,
> 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
Christoph,
> For block devices the target code 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.
Reviewed-by: Martin K.
Christoph,
> The target code is a consumer of the block layer and should generally
> work on struct block_device.
Reviewed-by: Martin K. Petersen
--
Martin K. Petersen Oracle Linux Engineering
Christoph,
> 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.
Reviewed-by: Martin K. Petersen
--
Martin K. Petersen Oracle Linux Engineering
Christoph,
> 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.
Reviewed-by: Martin K. Petersen
--
Martin K. Petersen Oracle Linux Engineering
Christoph,
> 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 maches what
> is done on the whole device.
Looks good.
Reviewed-by: Martin K.
Christoph,
> This does the same as the open coded variant except for an extra
> branch, and allows to remove queue_alignment_offset entirely.
Also fine.
Reviewed-by: Martin K. Petersen
--
Martin K. Petersen Oracle Linux Engineering
Christoph,
> No need to inline these fairly larger helpers.
Reviewed-by: Martin K. Petersen
--
Martin K. Petersen Oracle Linux Engineering
Christoph,
> No need to inline these fairly larger helpers. Also fix the return
> value to be unsigned, just like the field in struct queue_limits.
I believe the original reason for the signed int here was to be able to
express -1 for sysfs. I am not sure why I didn't just use the misaligned
Christoph,
> Move all the logic to limit the discard bio size into a common helper
> so that it is better documented.
Looks OK.
Reviewed-by: Martin K. Petersen
--
Martin K. Petersen Oracle Linux Engineering
Christoph,
> Just use a non-zero max_discard_sectors as an indicator for discard
> support, similar to what is done for write zeroes.
Very happy to finally see this flag removed!
Reviewed-by: Martin K. Petersen
--
Martin K. Petersen Oracle Linux Engineering
tree: https://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm.git
next
head: dc1acd5c94699389a9ed023e94dd860c846ea1f6
commit: 2f9dbeda8dc04b5b754e032000adf6bab03aa9be [13/23] dlm: use __le types
for rcom messages
config: microblaze-randconfig-r024-20220406
(https://download.01
Christoph,
> For block devices the target code 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
On 4/6/22 2:05 PM, Christoph Hellwig wrote:
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,
On 4/6/22 2:05 PM, Christoph Hellwig wrote:
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
77 matches
Mail list logo