From: Paul Durrant
Currently libxl__device_pci_add_xenstore() is broken in that does not
update the domain's configuration for the first device added (which causes
creation of the overall backend area in xenstore). This can be easily observed
by running 'xl list -l' after adding a single device:
From: Paul Durrant
Both 'domid' and 'pci' are available in 'pci_remove_state' so there is no
need to also pass them as separate arguments.
Signed-off-by: Paul Durrant
---
Cc: Ian Jackson
Cc: Wei Liu
---
tools/libs/light/libxl_pci.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(
From: Paul Durrant
Simply spelling correction. Purely cosmetic fix.
Signed-off-by: Paul Durrant
---
Cc: Ian Jackson
Cc: Wei Liu
---
tools/libs/light/libxl_pci.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/tools/libs/light/libxl_pci.c b/tools/l
From: Paul Durrant
For the purposes of re-binding a device to its previous driver
libxl__device_pci_assignable_add() writes the driver path into xenstore.
This path is then read back in libxl__device_pci_assignable_remove().
The functions that support this writing to and reading from xenstore ar
From: Paul Durrant
... devices.
Currently there is an assumption built into libxl__device_list() that device
backends are fully enumarated under the '/libxl' path in xenstore. This is
not the case for PCI backend devices, which are only properly enumerated
under '/local/domain/0/backend'.
This
From: Paul Durrant
... to hold a pointer to the device.
There is already a 'pci' field in 'pci_add_state' so simply use that from
the start. This also allows the 'pci' (#3) argument to be dropped from
do_pci_add().
NOTE: This patch also changes the type of the 'pci_domid' field in
'pci_ad
From: Paul Durrant
The seemingly arbitrary use of 'pci' and 'pcidev' in the code in libxl_pci.c
is confusing and also compromises use of some macros used for other device
types. Indeed it seems that DEFINE_DEVICE_TYPE_STRUCT_X exists solely because
of this duality.
This patch purges use of 'pcid
From: Paul Durrant
Other parameters, such as 'msitranslate' and 'permissive' are dealt with
but 'rdm_policy' appears to be have been completely missed.
Signed-off-by: Paul Durrant
---
Cc: Ian Jackson
Cc: Wei Liu
---
tools/libs/light/libxl_pci.c | 9 ++---
1 file changed, 6 insertions(+),
From: Paul Durrant
The code currently checks explicitly whether the device is already assigned,
but this is actually unnecessary as assigned devices do not form part of
the list returned by libxl_device_pci_assignable_list() and hence the
libxl_pci_assignable() test would have already failed.
Si
From: Paul Durrant
Paul Durrant (23):
xl / libxl: s/pcidev/pci and remove DEFINE_DEVICE_TYPE_STRUCT_X
libxl: make libxl__device_list() work correctly for
LIBXL__DEVICE_KIND_PCI...
libxl: Make sure devices added by pci-attach are reflected in the
config
libxl: add/recover 'rdm_poli
From: Paul Durrant
A previous patch introduced libxl_device_pci_list_free() which should be used
by callers of libxl_device_pci_list() to properly dispose of the exported
'libxl_device_pci' types and the free the memory holding them. Whilst all
current callers do ensure the memory is freed, only
From: Paul Durrant
A subsequent patch will introduce code to allow a name to be specified to
'xl pci-assignable-add' such that the assignable device may be referred to
by than name in subsequent operations.
Signed-off-by: Paul Durrant
---
Cc: Ian Jackson
Cc: Wei Liu
---
docs/man/xl.1.pod.in
From: Paul Durrant
... rather than an open-coded equivalent.
This patch tidies up the is_pci_in_array() function, making it take a single
'libxl_device_pci' argument rather than separate domain, bus, device and
function arguments. The already-available COMPARE_PCI() macro can then be
used and it
From: Paul Durrant
Currently the documentation completely fails to mention the existence of
PCI_SPEC_STRING. This patch tidies things up, specifically clarifying that
'pci-assignable-add/remove' take arguments where as 'pci-attach/detach'
take arguments (which will be enforced in a subsequent
p
From: Paul Durrant
... to use 'libxl_pci_bdf' rather than 'libxl_device_pci'.
This patch modifies the API and callers accordingly. It also modifies
several internal functions in libxl_pci.c that support the API to also use
'libxl_pci_bdf'.
NOTE: The OCaml bindings are adjusted to contain the in
From: Paul Durrant
This patch adds a 'name' field into the idl for 'libxl_device_pci' and
libxlu_pci_parse_spec_string() is modified to parse the new 'name'
parameter of PCI_SPEC_STRING detailed in the updated documention in
xl-pci-configuration(5).
If the 'name' field is non-NULL then both libx
From: Paul Durrant
... and put it into a new xl-pci-configuration(5) manpage, akin to the
xl-network-configration(5) and xl-disk-configuration(5) manpages.
This patch moves the content of the section verbatim. A subsequent patch
will improve the documentation, once it is in its new location.
Si
From: Paul Durrant
Use of this function is a very inefficient way to check whether a device
has already been assigned.
This patch adds code that saves the domain id in xenstore at the point of
assignment, and removes it again when the device id de-assigned (or the
domain is destroyed). It is the
From: Paul Durrant
Since assignable devices can be named, a subsequent patch will support use
of a PCI_SPEC_STRING containing a 'name' parameter instead of a 'bdf'. In
this case the name will be used to look up the 'bdf' in the list of assignable
(or assigned) devices.
Signed-off-by: Paul Durran
From: Paul Durrant
This patch modifies libxl_device_pci_assignable_add() to take an optional
'name' argument, which (if supplied) is saved into xenstore and can hence be
used to refer to the now-assignable BDF in subsequent operations. To
facilitate this, a new libxl_device_pci_assignable_name2bd
From: Paul Durrant
This patch largely re-writes the code to parse a PCI_SPEC_STRING and enters
it via the newly introduced function. The new parser also deals with 'bdf'
and 'vslot' as non-positional paramaters, as per the documentation in
xl-pci-configuration(5).
The existing xlu_pci_parse_bdf(
From: Paul Durrant
... and prepare for adding support for non-positional parsing of 'bdf' and
'vslot' in a subsequent patch.
Also document 'BDF' as a first-class parameter type and fix the documentation
to state that the default value of 'rdm_policy' is actually 'strict', not
'relaxed', as can b
From: Paul Durrant
... to be used by callers of libxl_device_pci_assignable_list().
Currently there is no API for callers of libxl_device_pci_assignable_list()
to free the list. The xl function pciassignable_list() calls
libxl_device_pci_dispose() on each element of the returned list, but
libxl_
From: Paul Durrant
... and use in 'libxl_device_pci'
This patch is preparatory work for restricting the type passed to functions
that only require BDF information, rather than passing a 'libxl_device_pci'
structure which is only partially filled. In this patch only the minimal
mechanical changes
On 24.11.2020 01:58, Andrew Cooper wrote:
> On 23/10/2020 11:17, Jan Beulich wrote:
>> ... into its own CU, to build it into an archive.
>>
>> Signed-off-by: Jan Beulich
>> ---
>> xen/common/lib.c | 39 --
>> xen/lib/Makefile | 1 +
>> xen/lib/parse-size.c
On 24.11.2020 01:40, Andrew Cooper wrote:
> On 23/11/2020 22:49, Julien Grall wrote:
>> On 19/11/2020 10:27, Jan Beulich wrote:
>>> On 18.11.2020 19:09, Julien Grall wrote:
On 23/10/2020 11:19, Jan Beulich wrote:
> --- a/xen/include/xen/compiler.h
> +++ b/xen/include/xen/compiler.h
>>>
On 23.11.2020 18:13, Julien Grall wrote:
> My view on 2) can change if Jan provides enough information into why one
> would want NS1650 PCI enabled by default on Arm but disable MSI.
Because, like it was on x86, initially there may be no support for
MSI? I have no idea what the plans are ...
Jan
Hello ,
> On 24 Nov 2020, at 12:02 am, Stefano Stabellini
> wrote:
>
> On Mon, 23 Nov 2020, Jan Beulich wrote:
>> Pure code motion; no functional change intended.
>>
>> Signed-off-by: Jan Beulich
>
> Reviewed-by: Stefano Stabellini
>
Reviewed-by: Rahul Singh
Regards,
Rahul
>
>> ---
>> v
Hello Jan,
> On 24 Nov 2020, at 12:11 am, Stefano Stabellini
> wrote:
>
> On Mon, 23 Nov 2020, Jan Beulich wrote:
>> Pure code motion (plus the addition of "#ifdef CONFIG_X86); no
>> functional change intended.
>>
>> Reported-by: Julien Grall
>> Signed-off-by: Jan Beulich
>
> Great cleanup
Hello ,
> On 24 Nov 2020, at 12:11 am, Stefano Stabellini
> wrote:
>
> On Mon, 23 Nov 2020, Jan Beulich wrote:
>> There's no point wrapping the function invocation when
>> - the function body is already suitably wrapped,
>> - the function itself is unconditionally available.
>>
>> Reported-by:
On 23.11.2020 18:39, Manuel Bouyer wrote:
> On Mon, Nov 23, 2020 at 06:06:10PM +0100, Roger Pau Monné wrote:
>> OK, I'm afraid this is likely too verbose and messes with the timings.
>>
>> I've been looking (again) into the code, and I found something weird
>> that I think could be related to the i
Hi Jan,
On 24/11/2020 09:47, Jan Beulich wrote:
On 23.11.2020 18:13, Julien Grall wrote:
My view on 2) can change if Jan provides enough information into why one
would want NS1650 PCI enabled by default on Arm but disable MSI.
Because, like it was on x86, initially there may be no support for
flight 156977 libvirt real [real]
http://logs.test-lab.xenproject.org/osstest/logs/156977/
Regressions :-(
Tests which did not succeed and are blocking,
including tests which could not be run:
build-armhf-libvirt 6 libvirt-buildfail REGR. vs. 151777
build-amd64-libvirt
On 24.11.2020 11:22, Julien Grall wrote:
> On 24/11/2020 09:47, Jan Beulich wrote:
>> On 23.11.2020 18:13, Julien Grall wrote:
>>> My view on 2) can change if Jan provides enough information into why one
>>> would want NS1650 PCI enabled by default on Arm but disable MSI.
>>
>> Because, like it was
On 23.11.2020 17:14, Andrew Cooper wrote:
> On 23/11/2020 16:07, Roger Pau Monné wrote:
>> On Mon, Nov 23, 2020 at 04:30:05PM +0100, Jan Beulich wrote:
>>> On 23.11.2020 16:24, Roger Pau Monné wrote:
On Mon, Nov 23, 2020 at 01:40:12PM +0100, Jan Beulich wrote:
> --- a/xen/arch/x86/acpi/pow
On the Cortex A55, TLB entries can be allocated by a speculative AT
instruction. If this is happening during a guest context switch with an
inconsistent page table state in the guest, TLBs with wrong values might
be allocated.
The ARM64_WORKAROUND_AT_SPECULATE workaround is used as for erratum
1165
On 20.11.2020 14:13, Juergen Gross wrote:
> @@ -507,6 +509,42 @@ void __init initialize_keytable(void)
> }
> }
>
> +#define CRASHACTION_SIZE 32
> +static char crash_debug_panic[CRASHACTION_SIZE];
> +static char crash_debug_hwdom[CRASHACTION_SIZE];
> +static char crash_debug_watchdog[CRASHA
On 24.11.2020 08:01, Juergen Gross wrote:
> In order to avoid latent races when updating an event channel put
> xen_consumer and pending fields in different bytes.
I think there's a little more to be said here as to what the
actual risk is, as the two fields are - afaict - at present
fine the way
flight 156975 xen-unstable real [real]
http://logs.test-lab.xenproject.org/osstest/logs/156975/
Failures :-/ but no regressions.
Tests which did not succeed, but are not blocking:
test-amd64-amd64-xl-qemuu-ws16-amd64 19 guest-stopfail like 156956
test-amd64-amd64-xl-qemuu-win7-amd64
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Xen Security Advisory XSA-355
version 2
stack corruption from XSA-346 change
UPDATES IN VERSION 2
Added metadata file.
Public release.
ISSUE DESCRIPTION
On 24.11.20 12:42, Jan Beulich wrote:
On 24.11.2020 08:01, Juergen Gross wrote:
In order to avoid latent races when updating an event channel put
xen_consumer and pending fields in different bytes.
I think there's a little more to be said here as to what the
actual risk is, as the two fields a
Hi Julien,
> On 19 Nov 2020, at 19:07, Julien Grall wrote:
>
> From: Julien Grall
>
> The ; at the end of mm_printk() means the following code will not build
> correctly:
>
> if ( ... )
>mm_printk(...);
> else
>...
>
> As we treat the macro as a function, we want to remove the ; at t
On Tue, Nov 24, 2020 at 11:05:12AM +0100, Jan Beulich wrote:
> On 23.11.2020 18:39, Manuel Bouyer wrote:
> > On Mon, Nov 23, 2020 at 06:06:10PM +0100, Roger Pau Monné wrote:
> >> OK, I'm afraid this is likely too verbose and messes with the timings.
> >>
> >> I've been looking (again) into the code
On 24.11.20 12:27, Jan Beulich wrote:
On 20.11.2020 14:13, Juergen Gross wrote:
@@ -507,6 +509,42 @@ void __init initialize_keytable(void)
}
}
+#define CRASHACTION_SIZE 32
+static char crash_debug_panic[CRASHACTION_SIZE];
+static char crash_debug_hwdom[CRASHACTION_SIZE];
+static cha
On Wed, Nov 18, 2020 at 09:47:41AM +0100, Christoph Hellwig wrote:
> 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
Acked-by: Tejun Heo
Thanks.
--
tejun
On 24.11.2020 13:18, Jürgen Groß wrote:
> On 24.11.20 12:42, Jan Beulich wrote:
>> On 24.11.2020 08:01, Juergen Gross wrote:
>>> @@ -94,9 +93,10 @@ struct evtchn
>>> #define ECS_VIRQ 5 /* Channel is bound to a virtual IRQ line.
>>>*/
>>> #define ECS_IPI 6 /* Channel is
On Tue, Nov 24, 2020 at 12:03:45PM +, Xen.org security team wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Xen Security Advisory XSA-355
> version 2
>
> stack corruption from XSA-346 change
>
> UPDATES IN VERS
On 24.11.20 13:37, Jan Beulich wrote:
On 24.11.2020 13:18, Jürgen Groß wrote:
On 24.11.20 12:42, Jan Beulich wrote:
On 24.11.2020 08:01, Juergen Gross wrote:
@@ -94,9 +93,10 @@ struct evtchn
#define ECS_VIRQ 5 /* Channel is bound to a virtual IRQ line.
*/
#define ECS_IPI
Hi Julien,
> On 19 Nov 2020, at 19:07, Julien Grall wrote:
>
> From: Julien Grall
>
> discard_init_modules() is an init function, if the path contains a
> BUG() or WARN() we still want to get the full stack trace.
>
> The init virtual region is now kept after the last init function has
> been
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
Signed-off-by: Christoph Hellwig
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jan Kara
Reviewed-by: Johannes Thumshirn
---
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/in
Store the frozen superblock in struct block_device to avoid the awkward
interface that can return a sb only used a cookie, an ERR_PTR or NULL.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-core.h | 5 -
drivers/md/dm.c | 20 ++--
fs/block_dev.c
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
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
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
Acked-by: Mike Snitzer
---
driv
Hi Jens,
this series cleans up our main per-device node data structure by merging
the block_device and hd_struct data structures that have the same scope,
but different life times. The main effect (besides removing lots of
code) is that instead of having two device sizes that need complex
synchro
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
Acked-by: Mike Snitzer
---
drivers/md/dm.c | 12 +++--
Use file->f_mapping in all remaining places that have a struct file
available to properly handle the case where inode->i_mapping !=
file_inode(file)->i_mapping.
Signed-off-by: Christoph Hellwig
---
mm/filemap.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/mm/
Just open code the wait in the only caller of both functions.
Signed-off-by: Christoph Hellwig
---
fs/internal.h | 2 ++
fs/quota/quota.c | 31 +---
fs/super.c | 51 ++
include/linux/fs.h | 4 +---
4 files chang
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
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jan Kara
Reviewed-by: Johannes Thumshirn
Acked-by: Tejun Heo
---
block/blk-cgr
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
sector_t is now always a u64, so this check is not needed.
Signed-off-by: Christoph Hellwig
---
block/ioctl.c | 9 -
1 file changed, 9 deletions(-)
diff --git a/block/ioctl.c b/block/ioctl.c
index 6b785181344fe1..0c09bb7a6ff35f 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -35,15 +3
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
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jan Kara
---
init/do_mounts.c | 68 ++--
1 file changed,
Use put_device to put the device instead of poking into the internals
and using kobject_put.
Signed-off-by: Christoph Hellwig
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jan Kara
Reviewed-by: Johannes Thumshirn
---
block/genhd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --g
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
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jan Kara
---
fs/block_dev.c | 26 ++
1
On 11/24/20 9:27 PM, Christoph Hellwig wrote:
> Use struct block_device to lookup partitions on a disk. This removes
> all usage of struct hd_struct from the I/O path, and this allows removing
> the percpu refcount in struct hd_struct.
>
> Signed-off-by: Christoph Hellwig
For the bcache part,
On 11/24/20 9:27 PM, Christoph Hellwig wrote:
> 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
On 11/24/20 9:27 PM, Christoph Hellwig wrote:
> 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
Add a little helper to find the kobject for a struct block_device.
Signed-off-by: Christoph Hellwig
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jan Kara
Reviewed-by: Johannes Thumshirn
---
drivers/md/bcache/super.c | 7 ++-
drivers/md/md.c | 4 +---
fs/block_dev.c
Pass the block_device actually needed instead of the hd_struct.
Signed-off-by: Christoph Hellwig
---
block/blk.h | 2 +-
block/genhd.c | 14 +++---
block/partitions/core.c | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/block/blk.h b/block/b
Move the make_it_fail flag to struct block_device an turn it into a bool
in preparation of killing struct hd_struct.
Signed-off-by: Christoph Hellwig
---
block/blk-core.c | 3 ++-
block/genhd.c | 4 ++--
include/linux/blk_types.h | 3 +++
include/linux/genhd.h | 3 ---
4
Move the partition_meta_info to struct block_device in preparation for
killing struct hd_struct.
Signed-off-by: Christoph Hellwig
---
block/blk.h | 1 -
block/genhd.c | 3 ++-
block/partitions/core.c | 18 +++---
fs/block_dev.c| 1 +
include
Properly open the device instead of relying on deep internals by
using get_gendisk. Note that this uses FMODE_NDELAY without either
FMODE_READ or FMODE_WRITE, which is a special open mode to allow
for opening without media access, thus avoiding unexpexted interactions
especially on removable media
Use struct block_device to lookup partitions on a disk. This removes
all usage of struct hd_struct from the I/O path, and this allows removing
the percpu refcount in struct hd_struct.
Signed-off-by: Christoph Hellwig
---
block/bio.c| 4 +-
block/blk-core.c
Don't play tricks with slab constructors as bdev structures tends to not
get reused very much, and this makes the code a lot less error prone.
Signed-off-by: Christoph Hellwig
---
fs/block_dev.c | 22 +-
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/fs/block_
Now that each hd_struct has a reference to the corresponding
block_device, there is no need for the bd_contains pointer. Add
a bdev_whole() helper to look up the whole device block_device
struture instead.
Signed-off-by: Christoph Hellwig
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jan Kara
-
Switch the partition iter infrastructure to iterate over block_device
references instead of hd_struct ones mostly used to get at the
block_device.
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 57 +++
block/partitions/core.c | 13 +
Just use the bd_partno field in struct block_device everywhere.
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 12 ++--
block/partitions/core.c | 9 -
include/linux/genhd.h | 1 -
init/do_mounts.c| 2 +-
4 files changed, 11 insertions(+), 13 deletions
Call disk_part_iter_exit in disk_part_iter_next instead of duplicating
the functionality.
Signed-off-by: Christoph Hellwig
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jan Kara
Reviewed-by: Johannes Thumshirn
---
block/genhd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --gi
Split each case into a self-contained helper, and move the block
dependent code entirely under the pre-existing #ifdef CONFIG_BLOCK.
This allows to remove the blk_lookup_devt stub in genhd.h.
Signed-off-by: Christoph Hellwig
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jan Kara
Reviewed-by: Joh
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
We can just dereference the point in struct gendisk instead. Also
remove the now unused export.
Signed-off-by: Christoph Hellwig
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jan Kara
---
block/genhd.c | 1 -
drivers/block/nbd.c | 4 +---
drivers/block/xen-blkfr
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 and can generally
simplify handling of st
Allocate hd_struct together with struct block_device to pre-load
the lifetime rule changes in preparation of merging the two structures.
Note that part0 was previously embedded into struct gendisk, but is
a separate allocation now, and already points to the block_device instead
of the hd_struct.
Just call devcgroup_check_permission to avoid various superflous checks
and a double conversion of the access flags.
Signed-off-by: Christoph Hellwig
---
fs/block_dev.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 2ffa11a95f
Move the dkstats and stamp field to struct block_device in preparation
of killing struct hd_struct.
Signed-off-by: Christoph Hellwig
---
block/blk-cgroup.c| 2 +-
block/blk-core.c | 4 ++--
block/blk.h | 1 -
block/genhd.c | 14 --
block/
Move more code that is only run on the outer open but not the open of
the underlying whole device when opening a partition into blkdev_get,
which leads to a much easier to follow structure.
This allows to simplify the disk and module refcounting so that one
reference is held for each open, similar
Avoid a totally pointless goto label, and use the same style of
comparism for both helpers.
Signed-off-by: Christoph Hellwig
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jan Kara
Reviewed-by: Johannes Thumshirn
---
init/do_mounts.c | 18 ++
1 file changed, 6 insertions(+), 12
Move the start_sect field to struct block_device in preparation
of killing struct hd_struct.
Signed-off-by: Christoph Hellwig
---
block/blk-core.c | 5 +++--
block/blk-lib.c | 2 +-
block/genhd.c | 4 ++--
block/partitions/core.c | 17 +
includ
To simplify block device lookup and a few other upcoming 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 memory. The upside will be that a lot of
code can be simpl
bd_part is never NULL for a block device in use by a file system, so
remove the checks.
Signed-off-by: Christoph Hellwig
---
fs/f2fs/checkpoint.c | 5 +
fs/f2fs/sysfs.c | 9 -
2 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoin
Reorder the code to have one big section for the last close, and to use
bdev_is_partition.
Signed-off-by: Christoph Hellwig
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jan Kara
---
fs/block_dev.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/fs/block_dev.c
Hello ,
> On 24 Nov 2020, at 11:12 am, Bertrand Marquis
> wrote:
>
> On the Cortex A55, TLB entries can be allocated by a speculative AT
> instruction. If this is happening during a guest context switch with an
> inconsistent page table state in the guest, TLBs with wrong values might
> be allo
Now that struct hd_struct has a block_device pointer use that to
find the disk.
Signed-off-by: Christoph Hellwig
---
include/linux/genhd.h | 10 +++---
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index d068e46f9086ae..dcf86a3d4d
Instead of having two structures that represent each block device with
different life time rules, merge 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
Pass the block_device actually needed instead of looking it up using
bdget_disk.
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/block/genhd.c b/block/genhd.c
index 498c816e90df64..2985740eab084b 100644
--- a/b
Stop passing the whole device as a separate argument given that it
can be trivially deducted and cleanup the !holder debug check.
Signed-off-by: Christoph Hellwig
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jan Kara
---
drivers/block/loop.c | 12 +-
fs/block_dev.c | 51 +
Move the policy field to struct block_device and rename it to the
more descriptive bd_read_only. Also turn the field into a bool as it
is used as such.
Signed-off-by: Christoph Hellwig
---
block/blk-core.c | 2 +-
block/genhd.c | 8
block/ioctl.c | 2 +-
Move the holder_dir field to struct block_device in preparation for
kill struct hd_struct.
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 5 +++--
block/partitions/core.c | 8
fs/block_dev.c| 11 +--
include/linux/blk_types.h | 1 +
include/lin
flight 156982 xen-unstable-smoke real [real]
http://logs.test-lab.xenproject.org/osstest/logs/156982/
Failures :-/ but no regressions.
Tests which did not succeed, but are not blocking:
test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass
test-arm64-arm64-xl-xsm 1
1 - 100 of 216 matches
Mail list logo