Hi,
> On 16 Nov 2020, at 07:24, Michal Orzel wrote:
>
> On the affected Cortex-A76/Neoverse-N1 cores (r0p0 to r3p0),
> if a virtual address for a cacheable mapping of a location is being
> accessed by a core while another core is remapping the virtual
> address to a new physical page using the r
How about keeping such an ID in xenstore itself in some kind of /meta hierarchy
where xenstore could also keep stats? As long xenstore is running this
information is easily accessible for outside tools.
-- C
From: Bjoern Doebel
Sent: 16 November 2020
Hi,
> -Original Message-
> From: Xen-devel On Behalf Of
> Bertrand Marquis
> Sent: 2020年11月16日 16:48
> To: Michal Orzel
> Cc: open list:X86 ; Stefano Stabellini
> ; Julien Grall ; Volodymyr Babchuk
>
> Subject: Re: [PATCH] xen/arm: Add workaround for Cortex-A76/Neoverse-N1
> erratum #12
flight 156814 xen-unstable real [real]
http://logs.test-lab.xenproject.org/osstest/logs/156814/
Failures :-/ but no regressions.
Tests which are failing intermittently (not blocking):
test-amd64-amd64-xl-rtds 20 guest-localmigrate/x10 fail pass in 156807
Tests which did not succeed, but
On 16/11/2020 08.02, Ulrich Windl wrote:
Daniel Kiper schrieb am 14.11.2020 um 00:52 in
> Nachricht <20201113235242.k6fzlwmwm2xqh...@tomti.i.net-space.pl>:
> ...
>> The members of struct bf_log_msg:
>> ‑ size: total size of bf_log_msg struct,
>> ‑ ts_nsec: timestamp expressed in nanosecon
Hi Michal,
On 16/11/2020 07:24, Michal Orzel wrote:
On the affected Cortex-A76/Neoverse-N1 cores (r0p0 to r3p0),
if a virtual address for a cacheable mapping of a location is being
accessed by a core while another core is remapping the virtual
address to a new physical page using the recommended
Hi, Paul!
On 11/10/20 7:51 PM, Paul Durrant wrote:
> From: Paul Durrant
>
> Paul Durrant (24):
>xl / libxl: s/pcidev/pci and remove DEFINE_DEVICE_TYPE_STRUCT_X
>libxl: use LIBXL_DEFINE_DEVICE_LIST for pci devices
>libxl: use LIBXL_DEFINE_DEVICE_LIST for nic devices
>libxl: s/detat
On 16.11.2020 11:12, Julien Grall wrote:
> Hi Michal,
>
> On 16/11/2020 07:24, Michal Orzel wrote:
>> On the affected Cortex-A76/Neoverse-N1 cores (r0p0 to r3p0),
>> if a virtual address for a cacheable mapping of a location is being
>> accessed by a core while another core is remapping the vir
On the affected Cortex-A76/Neoverse-N1 cores (r0p0 to r3p0),
if a virtual address for a cacheable mapping of a location is being
accessed by a core while another core is remapping the virtual
address to a new physical page using the recommended break-before-make
sequence, then under very rare circu
flight 156815 linux-linus real [real]
http://logs.test-lab.xenproject.org/osstest/logs/156815/
Regressions :-(
Tests which did not succeed and are blocking,
including tests which could not be run:
test-amd64-i386-xl-qemuu-ws16-amd64 7 xen-install fail REGR. vs. 152332
test-amd64-i386-qem
We should never build something that calls this without having it.
Signed-off-by: Alex Bennée
Reviewed-by: Philippe Mathieu-Daudé
Message-Id: <20201110192316.26397-6-alex.ben...@linaro.org>
diff --git a/stubs/xen-hw-stub.c b/stubs/xen-hw-stub.c
index 2ea8190921..15f3921a76 100644
--- a/stubs/xe
Chardev is already a typedef'ed struct.
Signed-off-by: Alex Bennée
Reviewed-by: Philippe Mathieu-Daudé
Message-Id: <20201110192316.26397-5-alex.ben...@linaro.org>
diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
index 1406648ca5..0f9962b1c1 100644
--- a/include/hw/xen/xen.h
+++ b/includ
NS16550 driver has PCI support that is under HAS_PCI flag. When HAS_PCI
is enabled for ARM, compilation error is observed for ARM architecture
because ARM platforms do not have full PCI support available.
Introducing new kconfig option CONFIG_HAS_NS16550_PCI to support
ns16550 PCI for X86.
For X8
If mem-sharing, mem-paging, or log-dirty functionality is not enabled
for non-x86 architecture when HAS_PCI is enabled, the compiler will
throw an error.
Move code to x86 specific directory to fix compilation error.
Also, modify the code to use likely() in place of unlikley() for each
condition t
passthrough/pci.c file is common for all architecture, but there is x86
specific code in this file.
Move x86 specific code to the drivers/passthrough/io.c file to avoid
compilation error for other architecture.
As drivers/passthrough/io.c is compiled only for x86 move it to
x86 directory and rena
This patch series is v3 of preparatory work to make PCI passthrough code
non-x86 specific.
Rahul Singh (3):
xen/ns16550: Make ns16550 driver usable on ARM with HAS_PCI enabled.
xen/pci: Move x86 specific code to x86 directory.
xen/pci: solve compilation error on ARM with HAS_PCI enabled.
x
Hi,
> On 16 Nov 2020, at 12:11, Michal Orzel wrote:
>
> On the affected Cortex-A76/Neoverse-N1 cores (r0p0 to r3p0),
> if a virtual address for a cacheable mapping of a location is being
> accessed by a core while another core is remapping the virtual
> address to a new physical page using the r
The update_bdev argument is always set to true, so remove it. Also
rename the function to the slighly less verbose set_capacity_and_notify,
as propagating the disk size to the block device isn't really
revalidation.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
Reviewed-by: Petr
There is no good reason to call revalidate_disk_size separately.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
drivers/nvme/host/core.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 9b01afcb7
This avoids the extra call to revalidate_disk_size in sd_rescan and
is otherwise a no-op because the size did not change, or we are in
the probe path.
Signed-off-by: Christoph Hellwig
Acked-by: Martin K. Petersen
Reviewed-by: Hannes Reinecke
---
drivers/scsi/sd.c | 8 +++-
1 file changed,
Block driver have no business setting the file system concept of a
block size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Josef Bacik
---
drivers/block/nbd.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index aaae9
__invalidate_device without the kill_dirty parameter just invalidates
various clean entries in caches, which doesn't really help us with
anything, but can cause all kinds of horrible lock orders due to how
it calls into the file system. The only reason this hasn't been a
major issue is because so
There is no good reason to call revalidate_disk_size separately.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
drivers/block/loop.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index a58084c2ed7ceb..0
Hi Jens,
this series builds on top of the work that went into the last merge window,
and make sure we have a single coherent interfac for updating the size of a
block device.
Changes since v2:
- rebased to the set_capacity_revalidate_and_notify in mainline
- keep the loop_set_size function
- f
nbd_size_update is about to acquire a few more callers, so lift the check
into the function.
Signed-off-by: Christoph Hellwig
Reviewed-by: Josef Bacik
---
drivers/block/nbd.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
Use set_capacity_and_notify to update the disk and block device sizes and
send a RESIZE uevent to userspace. Note that blktests relies on uevents
being sent also for updates that did not change the device size, so the
explicit kobject_uevent remains for that case.
Signed-off-by: Christoph Hellwig
Merge nbd_size_set and nbd_size_update into a single function that also
updates the nbd_config fields. This new function takes the device size
in bytes as the first argument, and the blocksize as the second argument,
simplifying the calculations required in most callers.
Signed-off-by: Christoph
Move the validation of the block from the callers into nbd_set_size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Josef Bacik
---
drivers/block/nbd.c | 47 +++--
1 file changed, 15 insertions(+), 32 deletions(-)
diff --git a/drivers/block/nbd.c b/driver
Updating the block device size from irq context can lead to torn
writes of the 64-bit value, and prevents us from using normal
process context locking primitives to serialize access to the 64-bit
nr_sectors value. Defer the set_capacity to the already existing
workqueue handler, where it can be me
Use set_capacity_and_notify to set the size of both the disk and block
device. This also gets the uevent notifications for the resize for free.
Signed-off-by: Christoph Hellwig
---
drivers/block/pktcdvd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/pktcdv
Oops,
this is a bigger patch bomb than intended. Only patches 1-23 are this
series which should be ready to be applied once for-5.11/block pulles in
5.10-rc4.
After that follow patches already in for-5.11/block and my current hot
off the press development branch.
Call disk_part_iter_exit in disk_part_iter_next instead of duplicating
the functionality.
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/block/genhd.c b/block/genhd.c
index 999f7142b04e7d..56bc37e98ed852 100644
--- a/block
Use set_disk_ro instead of set_device_ro to match all other block
drivers and to ensure all partitions mirror the read-only flag.
Signed-off-by: Christoph Hellwig
---
drivers/block/loop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/loop.c b/drivers/block/loo
When setting the whole device read-only (or clearing the read-only
state), also update the policy for all partitions. The s390 dasd
driver has awlways been doing this and it makes a lot of sense.
Signed-off-by: Christoph Hellwig
---
block/ioctl.c | 5 -
1 file changed, 4 insertions(+), 1 de
To simplify block device lookup and a few other upcomdin areas, make sure
that we always have a struct block_device available for each disk and
each partition. The only downside of this is that each device and
partition uses a little more memories. The upside will be that a lot of
code can be sim
Use set_capacity_and_notify to set the size of both the disk and block
device. This also gets the uevent notifications for the resize for free.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_main.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/b
ide is the last user of the blk_register_region framework except for the
tracking of allocated gendisk. Switch to __register_blkdev, even if that
doesn't allow us to trivially find out which command set to probe for.
That means we now always request all modules when a user tries to access
an uncla
BLKFLSBUF is entirely contained in the block core, and there is no
good reason to give the driver a hook into processing it.
Signed-off-by: Christoph Hellwig
---
block/ioctl.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/block/ioctl.c b/block/ioctl.c
index 3fbc382eb926d4..c6d8863f04
set_blocksize is used by file systems to use their preferred buffer cache
block size. Block drivers should not set it.
Signed-off-by: Christoph Hellwig
---
drivers/block/loop.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 9a27d4f1c08aac
Switch the block device lookup interfaces to directly work with a dev_t
so that struct block_device references are only acquired by the
blkdev_get variants (and the blk-cgroup special case). This means that
we not don't need an extra reference in the inode.
Signed-off-by: Christoph Hellwig
---
Use the simpler mechanism attached to major_name to allocate a brd device
when a currently unregistered minor is accessed.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
drivers/block/brd.c | 39 +++
1 file changed, 11 insertions(+), 28 del
Switch from using blk_register_region to the probe callback passed to
__register_blkdev to disable the request_module call for an unclaimed
dev_t in the SD majors.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
drivers/scsi/sd.c | 19 +--
1 file changed, 5 ins
reindent the driver using Lident as the code style was far away from
normal Linux code.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
drivers/block/z2ram.c | 493 --
1 file changed, 236 insertions(+), 257 deletions(-)
diff --git a/dri
Now that bdev_map is only used for finding gendisks, we can use
a simple xarray instead of the regions tracking structure for it.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
Reviewed-by: Greg Kroah-Hartman
---
block/genhd.c | 208 --
disk_get_part needs to be paired with a disk_put_part.
Fixes: ef45fe470e1 ("blk-cgroup: show global disk stats in root cgroup io.stat")
Signed-off-by: Christoph Hellwig
---
block/blk-cgroup.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index c68bdf
Signed-off-by: Christoph Hellwig
---
include/linux/genhd.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 46553d6d602563..22f5b9fd96f8bf 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -250,7 +250,6 @@ static inline dev_t p
Merge get_super_thawed and get_super_exclusive_thawed into a single
function.
Signed-off-by: Christoph Hellwig
---
fs/quota/quota.c | 4 ++--
fs/super.c | 42 +++---
include/linux/fs.h | 3 +--
3 files changed, 14 insertions(+), 35 deletions(-)
di
The Atari floppy driver usually autodetects the media when used with the
ormal /dev/fd? devices, which also are the only nodes created by udev.
But it also supports various aliases that force a given media format.
That is currently supported using the blk_register_region framework
which finds the f
Don't bother to call lookup_bdev for just a slightly different error
message without any functional change.
Signed-off-by: Christoph Hellwig
---
drivers/md/bcache/super.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/s
We don't really need the struct block_device to initialize a bio. So
switch from using bio_set_dev to manually setting up bi_disk (bi_partno
will always be zero and has been cleared by bio_init already).
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 12 +++-
1 file changed, 3 i
Use set_capacity_and_notify to set the size of both the disk and block
device. This also gets the uevent notifications for the resize for free.
Signed-off-by: Christoph Hellwig
Acked-by: Song Liu
---
drivers/md/md-cluster.c | 6 ++
drivers/md/md-linear.c | 3 +--
drivers/md/md.c
Now that all drivers that want to hook into setting or clearing the
read-only flag use the set_read_only method, this code can be removed.
Signed-off-by: Christoph Hellwig
---
block/ioctl.c | 23 ---
1 file changed, 23 deletions(-)
diff --git a/block/ioctl.c b/block/ioctl.c
Use set_capacity_and_notify to set the size of both the disk and block
device. This also gets the uevent notifications for the resize for free.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
drivers/md/dm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
Use set_capacity_and_notify to set the size of both the disk and block
device. This also gets the uevent notifications for the resize for free.
Signed-off-by: Christoph Hellwig
Acked-by: Ilya Dryomov
---
drivers/block/rbd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/
Use the simpler mechanism attached to major_name to allocate a md device
when a currently unregistered minor is accessed.
Signed-off-by: Christoph Hellwig
Acked-by: Song Liu
Reviewed-by: Hannes Reinecke
---
drivers/md/md.c | 21 -
1 file changed, 8 insertions(+), 13 deletio
The swim driver (unlike various other floppy drivers) doesn't have
magic device nodes for certain modes, and already registers a gendisk
for each of the floppies supported by a device. Thus the region
registered is a no-op and can be removed.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes
Copy and paste the kobj_map functionality in the block code in preparation
for completely rewriting it.
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 130 +-
1 file changed, 117 insertions(+), 13 deletions(-)
diff --git a/block/genhd.c b/bl
Implement the ->set_read_only method instead of parsing the actual
ioctl command.
Signed-off-by: Christoph Hellwig
---
drivers/s390/block/dasd.c | 1 +
drivers/s390/block/dasd_int.h | 3 ++-
drivers/s390/block/dasd_ioctl.c | 27 +--
3 files changed, 12 insertion
The floppy driver usually autodetects the media when used with the
normal /dev/fd? devices, which also are the only nodes created by udev.
But it also supports various aliases that force a given media format.
That is currently supported using the blk_register_region framework
which finds the floppy
Use set_capacity_and_notify to set the size of both the disk and block
device. This also gets the uevent notifications for the resize for free.
Signed-off-by: Christoph Hellwig
Acked-by: Jack Wang
---
drivers/block/rnbd/rnbd-clt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff -
Use separate gendisks (which share a tag_set) for the native Amgiga vs
the MS-DOS mode instead of redirecting the gendisk lookup using a probe
callback. This avoids potential problems with aliased block_device
instances and will eventually allow for removing the blk_register_region
framework.
Sig
Now that each gendisk has a reference to the block_device referencing
it, we can just use that everywhere and get rid of ->bd_contain.
Signed-off-by: Christoph Hellwig
---
drivers/scsi/scsicam.c| 2 +-
fs/block_dev.c| 50 +--
include/linux/blk
We can just dereference the point in struct gendisk instead. Also
remove the now unused export.
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 1 -
drivers/block/nbd.c | 4 +---
drivers/block/xen-blkfront.c| 20 +---
drivers/block/zram/z
There is no need to ever register the fake gendisk used for ide-tape.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
drivers/ide/ide-probe.c | 32
drivers/ide/ide-tape.c | 2 --
include/linux/ide.h | 3 ---
3 files changed, 37 deletions
revalidate_disk_size is now only called from set_capacity_and_notify,
so drop the export.
Signed-off-by: Christoph Hellwig
---
fs/block_dev.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 66ebf594c97f47..d8664f5c1ff669 100644
--- a/fs/block_dev.c
+++ b/
Use file->f_mapping in all functions that have a struct file available
to properly handle the case where file_inode(file)->i_mapping !=
inode->i_mapping.
Signed-off-by: Christoph Hellwig
---
mm/filemap.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/mm/filemap.c b/
Use the block layer helper to update both the disk and block device
sizes. Contrary to the name no notification is sent in this case,
as a size 0 is special cased.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
drivers/nvme/host/core.c | 13 +
1 file changed, 1 i
Instead of having two structures that represent each block device with
different lift time rules merged them into a single one. This also
greatly simplifies the reference counting rules, as we can use the inode
reference count as the main reference count for the new struct
block_device, with the d
BLKFLSBUF is not supposed to actually send a flush command to the device,
but to tear down buffer cache structures. Remove the mtd_blkdevs
implementation and just use the default semantics instead.
Signed-off-by: Christoph Hellwig
Acked-by: Richard Weinberger
---
drivers/mtd/mtd_blkdevs.c | 28
Stop passing the whole device as a separate argument given that it
can be trivially deducted.
Signed-off-by: Christoph Hellwig
---
drivers/block/loop.c | 12 +++-
fs/block_dev.c | 69 +++---
include/linux/blkdev.h | 6 ++--
3 files changed, 38 i
Use set_capacity_and_notify to set the size of both the disk and block
device. This also gets the uevent notifications for the resize for free.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
drivers/md/dm-raid.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff -
Now that the hd_struct always has a block device attached to it, there is
no need for having two size field that just get out of sync.
Additional the field in hd_struct did not use proper serializiation,
possibly allowing for torn writes. By only using the block_device field
this problem also get
The zram claim mechanism was added to ensure no new opens come in
during teardown. But the proper way to archive that is to call
del_gendisk first, which takes care of all that. Once del_gendisk
is called in the right place, the reset side can also be simplified
as no I/O can be outstanding on a
Implement the ->set_read_only method instead of parsing the actual
ioctl command.
Signed-off-by: Christoph Hellwig
Acked-by: Ilya Dryomov
---
drivers/block/rbd.c | 40
1 file changed, 4 insertions(+), 36 deletions(-)
diff --git a/drivers/block/rbd.c b/d
Fold set_device_ro into its only remaining caller.
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 7 ---
block/ioctl.c | 2 +-
include/linux/genhd.h | 1 -
3 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/block/genhd.c b/block/genhd.c
index 8c350fecfe8bfe..
Add a new method to allow for driver-specific processing when setting or
clearing the block device read-only state. This allows to replace the
cumbersome and error-prone override of the whole ioctl implementation.
Signed-off-by: Christoph Hellwig
---
block/ioctl.c | 5 +
include/li
Avoid a totally pointless goto label, and use the same style of
comparism for both helpers.
Signed-off-by: Christoph Hellwig
---
init/do_mounts.c | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/init/do_mounts.c b/init/do_mounts.c
index afa26a4028d25e..5879
Use set_capacity_and_notify to set the size of both the disk and block
device. This also gets the uevent notifications for the resize for free.
Signed-off-by: Christoph Hellwig
---
drivers/block/zram/zram_drv.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/b
Split the block_class_lock mutex into one each to protect bdev_map
and major_names.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
block/genhd.c | 29 +++--
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/block/genhd.c b/block/genhd.c
i
Split each case into a self-contained helper.
Signed-off-by: Christoph Hellwig
---
include/linux/genhd.h | 7 +-
init/do_mounts.c | 183 +-
2 files changed, 91 insertions(+), 99 deletions(-)
diff --git a/include/linux/genhd.h b/include/linux/genhd.
revalidate_disk_size just updates the block device size from the disk
size. Thus calling it from virtblk_update_cache_mode doesn't actually
do anything.
Signed-off-by: Christoph Hellwig
Acked-by: Stefan Hajnoczi
Acked-by: Michael S. Tsirkin
---
drivers/block/virtio_blk.c | 1 -
1 file changed
The code in devt_from_partuuid is very convoluted. Refactor a bit by
sanitizing the goto and variable name usage.
Signed-off-by: Christoph Hellwig
---
init/do_mounts.c | 68 ++--
1 file changed, 31 insertions(+), 37 deletions(-)
diff --git a/init/do_
set_blocksize is used by file systems to use their preferred buffer cache
block size. Block drivers should not set it.
Signed-off-by: Christoph Hellwig
---
drivers/block/zram/zram_drv.c | 11 +--
drivers/block/zram/zram_drv.h | 1 -
2 files changed, 1 insertion(+), 11 deletions(-)
dif
bd_mutex is primarily used for synchronizing the block device open and
release path, which recurses from partitions to the whole disk device.
The fact that we have two locks makes life unnecessarily complex due
to lock order constrains. Replace the two levels of locking with a
single mutex in the
Add a callback to the major_names array that allows a driver to override
how to probe for dev_t that doesn't currently have a gendisk registered.
This will help separating the lookup of the gendisk by dev_t vs probe
action for a not currently registered dev_t.
Signed-off-by: Christoph Hellwig
Rev
Instead of reusing the ranges in bdev_map, add a new helper that is
called if no ranges was found. This is a first step to unpeel and
eventually remove the complex ranges structure.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
block/genhd.c | 25 +++--
Use separate gendisks (which share a tag_set) for the different operating
modes instead of redirecting the gendisk lookup using a probe callback.
This avoids potential problems with aliased block_device instances and
will eventually allow for removing the blk_register_region framework.
Signed-off-
None of the ->resize methods updates the disk size, so calling
revalidate_disk_size here won't do anything.
Signed-off-by: Christoph Hellwig
Acked-by: Song Liu
---
drivers/md/md-cluster.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c
inde
Implement the ->set_read_only method instead of parsing the actual
ioctl command.
Signed-off-by: Christoph Hellwig
---
drivers/md/md.c | 62 -
1 file changed, 31 insertions(+), 31 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 3
Use the simpler mechanism attached to major_name to allocate a brd device
when a currently unregistered minor is accessed.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
drivers/block/loop.c | 30 --
1 file changed, 8 insertions(+), 22 deletions(-)
Get rid of the long-lasting struct block_device reference in
struct mapped_device. The only remaining user is the freeze code,
where we can trivially look up the block device at freeze time
and release the reference at thaw time.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-core.h | 2 --
Use put_device to put the device instead of poking into the internals
and using kobject_put.
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/genhd.c b/block/genhd.c
index 56bc37e98ed852..f1e20ec1b62887 100644
--- a/bloc
Add a little helper to find the kobject for a struct block_device.
Signed-off-by: Christoph Hellwig
---
drivers/md/bcache/super.c | 7 ++-
drivers/md/md.c | 4 +---
fs/btrfs/sysfs.c | 15 +++
include/linux/blk_types.h | 3 +++
4 files changed, 9 insertions(+
Adding the minor to the major creates tons of pointless conflicts. Just
use the dev_t itself, which is 32-bits and thus is guaranteed to fit
into ino_t.
Signed-off-by: Christoph Hellwig
---
fs/block_dev.c | 26 ++
1 file changed, 2 insertions(+), 24 deletions(-)
diff --g
Merge three hidden gendisk checks into one.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
block/genhd.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/block/genhd.c b/block/genhd.c
index b0f0b0cac9aa7f..8180195b76634b 100644
--- a/block/g
del_gendisk already calls fsync_bdev for every partition, no need
to do this twice.
Signed-off-by: Christoph Hellwig
---
drivers/block/mtip32xx/mtip32xx.c | 15 ---
drivers/block/mtip32xx/mtip32xx.h | 2 --
2 files changed, 17 deletions(-)
diff --git a/drivers/block/mtip32xx/mtip32
Just open code it in the few callers.
Signed-off-by: Christoph Hellwig
---
block/ioctl.c | 25 +
drivers/block/pktcdvd.c | 6 --
drivers/md/bcache/request.c | 5 +++--
drivers/md/dm.c | 5 -
include/linux/blkdev.h | 2 --
5 f
SWAPGS is used only for interrupts coming from user mode or for
returning to user mode. So there is no reason to use the PARAVIRT
framework, as it can easily be replaced by an ALTERNATIVE depending
on X86_FEATURE_XENPV.
There are several instances using the PV-aware SWAPGS macro in paths
which are
Xen PV guests don't use IST. For double fault interrupts switch to
the same model as NMI.
Signed-off-by: Juergen Gross
---
arch/x86/include/asm/idtentry.h | 3 +++
arch/x86/xen/enlighten_pv.c | 8 +++-
arch/x86/xen/xen-asm.S | 2 +-
3 files changed, 11 insertions(+), 2 deletions
USERGS_SYSRET64 is used to return from a syscall via sysret, but
a Xen PV guest will nevertheless use the iret hypercall, as there
is no sysret PV hypercall defined.
So instead of testing all the prerequisites for doing a sysret and
then mangling the stack for Xen PV again for doing an iret just u
1 - 100 of 123 matches
Mail list logo