search for: physical_block_size

Displaying 20 results from an estimated 29 matches for "physical_block_size".

2020 Feb 10
2
Re: [RFC] lib: allow to specify physical/logical block size for disks
...itioned on a system with "4K native" sector > > size support. > > Do you have a small test case for this? > > > In order to fix the issue we need to allow users to specify desired > > physical and/or logical block size per drive basis. > > It seems like physical_block_size / logical_block_size in qemu are > completely undocumented. However I did some experiments with patching > libguestfs and examining the qemu and parted code. Here are my > observations: > > (1) Setting only physical_block_size = 4096 seems to do nothing. The guest sees the physic...
2020 Feb 10
2
Re: [RFC] lib: allow to specify physical/logical block size for disks
...gt; Do you have a small test case for this? We can easily create one with patched libguestfs and attach disk to unpatched libguestfs. > > In order to fix the issue we need to allow users to specify desired > > physical and/or logical block size per drive basis. > > It seems like physical_block_size / logical_block_size in qemu are > completely undocumented. However I did some experiments with patching > libguestfs and examining the qemu and parted code. Here are my > observations: > > (1) Setting only physical_block_size = 4096 seems to do nothing. See my thoughts on this in...
2020 Feb 07
8
[RFC] lib: allow to specify physical/logical block size for disks
...d_direct_data *data, return -1; } +/** + * Add the blockio elements of the C<-device> parameter. + */ +static int +add_device_blockio_params (guestfs_h *g, struct qemuopts *qopts, + struct drive *drv) +{ + if (drv->pblocksize) + append_list_format ("physical_block_size=%d", drv->pblocksize); + if (drv->lblocksize) + append_list_format ("logical_block_size=%d", drv->lblocksize); + + return 0; + + /* This label is called implicitly from the qemuopts macros on error. */ + qemuopts_error: + perrorf (g, "qemuopts"); + return -...
2020 Feb 10
0
Re: [RFC] lib: allow to specify physical/logical block size for disks
...ive" sector > > > size support. > > > > Do you have a small test case for this? > > > > > In order to fix the issue we need to allow users to specify desired > > > physical and/or logical block size per drive basis. > > > > It seems like physical_block_size / logical_block_size in qemu are > > completely undocumented. However I did some experiments with patching > > libguestfs and examining the qemu and parted code. Here are my > > observations: > > > > (1) Setting only physical_block_size = 4096 seems to do nothing. &g...
2020 Feb 10
2
Re: [RFC] lib: allow to specify physical/logical block size for disks
...al/logical > > block size? > > I'm fairly sure we only need one of these. I'm just not > sure which one we need. I think we need to ask an expert > or look at the qemu / kernel code to find out exactly what > each setting really does. Here are what they do stand for: physical_block_size: The physical block size the disk will report to the guest OS. For Linux this would be the value returned by the BLKPBSZGET ioctl and describes the disk's hardware sector size which can be relevant for the alignment of disk data. We don't have an API to get this one. logical_block_size: Th...
2020 Feb 10
0
Re: [RFC] lib: allow to specify physical/logical block size for disks
...is? > > We can easily create one with patched libguestfs and attach disk to > unpatched libguestfs. > > > > In order to fix the issue we need to allow users to specify desired > > > physical and/or logical block size per drive basis. > > > > It seems like physical_block_size / logical_block_size in qemu are > > completely undocumented. However I did some experiments with patching > > libguestfs and examining the qemu and parted code. Here are my > > observations: > > > > (1) Setting only physical_block_size = 4096 seems to do nothing. &g...
2019 Oct 29
2
[PATCH] fish: add option --blocksize for disks
When --blocksize <val> is provided, qemu command line would add physical_block_size=<val>,physical_logical_size=<val> to -device directive. Example: qemu-kvm \ -drive file=raw.img,cache=writeback,id=hd0,if=none \ -device scsi-hd,drive=hd0,physical_block_size=4096,logical_block_size=4096 \ Signed-off-by: Tuan Hoang <tmhoang@linux.ibm.com> --- fish/fish....
2020 Jul 21
1
[PATCH 01/10] block: introduce blk_is_valid_logical_block_size
...size > + **/ > +bool blk_is_valid_logical_block_size(unsigned int size) > +{ > + return size >= SECTOR_SIZE && size <= PAGE_SIZE && !is_power_of_2(size); Shouldn't this be a ... && is_power_of_2(size)? > if (q->limits.io_min < q->limits.physical_block_size) > q->limits.io_min = q->limits.physical_block_size; > + > } This adds a pointless empty line. > +extern bool blk_is_valid_logical_block_size(unsigned int size); No need for externs on function declarations.
2020 Feb 10
0
Re: [RFC] lib: allow to specify physical/logical block size for disks
...ions on a > disk image which was partitioned on a system with "4K native" sector > size support. Do you have a small test case for this? > In order to fix the issue we need to allow users to specify desired > physical and/or logical block size per drive basis. It seems like physical_block_size / logical_block_size in qemu are completely undocumented. However I did some experiments with patching libguestfs and examining the qemu and parted code. Here are my observations: (1) Setting only physical_block_size = 4096 seems to do nothing. (2) Setting only logical_block_size = 4096 is expl...
2020 Jul 21
0
[PATCH 01/10] block: introduce blk_is_valid_logical_block_size
..._segment_size); > > **/ > > void blk_queue_logical_block_size(struct request_queue *q, unsigned int size) > > { > > + WARN_ON(!blk_is_valid_logical_block_size(size)); > > + > > q->limits.logical_block_size = size; > > > > if (q->limits.physical_block_size < size) > > @@ -330,6 +347,7 @@ void blk_queue_logical_block_size(struct request_queue *q, unsigned int size) > > > > if (q->limits.io_min < q->limits.physical_block_size) > > q->limits.io_min = q->limits.physical_block_size; > > + > > w...
2020 Jul 21
0
[PATCH 01/10] block: introduce blk_is_valid_logical_block_size
...the request queue for the device @@ -323,6 +338,8 @@ EXPORT_SYMBOL(blk_queue_max_segment_size); **/ void blk_queue_logical_block_size(struct request_queue *q, unsigned int size) { + WARN_ON(!blk_is_valid_logical_block_size(size)); + q->limits.logical_block_size = size; if (q->limits.physical_block_size < size) @@ -330,6 +347,7 @@ void blk_queue_logical_block_size(struct request_queue *q, unsigned int size) if (q->limits.io_min < q->limits.physical_block_size) q->limits.io_min = q->limits.physical_block_size; + } EXPORT_SYMBOL(blk_queue_logical_block_size); diff --git...
2020 Feb 10
0
Re: [RFC] lib: allow to specify physical/logical block size for disks
On Mon, Feb 10, 2020 at 02:22:01PM +0200, Nikolay Ivanets wrote: > Here are what they do stand for: > physical_block_size: The physical block size the disk will report to > the guest OS. For Linux this would be the value returned by the > BLKPBSZGET ioctl and describes the disk's hardware sector size which > can be relevant for the alignment of disk data. We don't have an API > to get this one. &gt...
2019 Nov 05
2
[PATCH v3 RESEND] direct, fish: add blocksize as optional argument for launch command
...ll to accept an optional argument, called `blocksize`. Example: $ guestfish --listen -a raw.img $ guestfish --remote -- launch blocksize:4096 The actual qemu command is: [...] -device virtio-scsi-ccw,id=scsi -drive file=raw.img,cache=writeback,id=hd0,if=none -device scsi-hd,drive=hd0,physical_block_size=4096,logical_block_size=4096 [...] Signed-off-by: Tuan Hoang <tmhoang@linux.ibm.com> --- generator/actions_core.ml | 18 ++++++++++++++++-- lib/guestfs-internal.h | 3 +++ lib/launch-direct.c | 6 ++++++ lib/launch.c | 12 +++++++++++- 4 files changed, 36 insertions(...
2014 Apr 30
1
3TB non-system disk reports wrong size on Centos 6 x86_64
.../docs/pdf/datasheet/disc/barracuda-ds1737-1-11 11us.pdf Disk /dev/sdb: 2199GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags (parted) q Information: You may need to update /etc/fstab. root at five-72 ~ # cat /sys/block/sdb/queue/physical_block_size 512 But the drive says 4k sector size! What am I doing wrong? -Jason -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant...
2019 Nov 05
1
[PATCH v2 RESEND] direct, fish: add command launch_blocksize
...unch_blocksize`, accompanied alias is `run-blocksize`. Example: $ guestfish --listen -a raw.img $ guestfish --remote -- launch_blocksize 4096 The actual qemu command is: [...] -device virtio-scsi-ccw,id=scsi -drive file=raw.img,cache=writeback,id=hd0,if=none -device scsi-hd,drive=hd0,physical_block_size=4096,logical_block_size=4096 [...] Ideally it would be better to invoke optional option to `launch` command like: $ guestfish --remote -- launch --blocksize 4096 Signed-off-by: Tuan Hoang <tmhoang@linux.ibm.com> --- generator/actions_core.ml | 11 +++++++++++ lib/guestfs-internal.h |...
2020 Feb 10
0
Re: [RFC] lib: allow to specify physical/logical block size for disks
...+/** > + * Add the blockio elements of the C<-device> parameter. > + */ > +static int > +add_device_blockio_params (guestfs_h *g, struct qemuopts *qopts, > + struct drive *drv) > +{ > + if (drv->pblocksize) > + append_list_format ("physical_block_size=%d", drv->pblocksize); > + if (drv->lblocksize) > + append_list_format ("logical_block_size=%d", drv->lblocksize); > + > + return 0; > + > + /* This label is called implicitly from the qemuopts macros on error. */ > + qemuopts_error: > + perror...
2020 Feb 11
2
[PATCH v2] lib: add support for disks with 4096 bytes sector size
...(from guestfs_config). */ diff --git a/lib/launch-direct.c b/lib/launch-direct.c index ae6ca093b..0f4bbf15f 100644 --- a/lib/launch-direct.c +++ b/lib/launch-direct.c @@ -273,6 +273,27 @@ add_drive_standard_params (guestfs_h *g, struct backend_direct_data *data, return -1; } +/** + * Add the physical_block_size and logical_block_size elements of the C<-device> + * parameter. + */ +static int +add_device_blocksize_params (guestfs_h *g, struct qemuopts *qopts, + struct drive *drv) +{ + if (drv->blocksize) { + append_list_format ("physical_block_size=%d", drv-...
2020 Feb 10
1
[PATCH] lib: allow to specify physical/logical block size for disks
...(from guestfs_config). */ diff --git a/lib/launch-direct.c b/lib/launch-direct.c index ae6ca093b..0f4bbf15f 100644 --- a/lib/launch-direct.c +++ b/lib/launch-direct.c @@ -273,6 +273,27 @@ add_drive_standard_params (guestfs_h *g, struct backend_direct_data *data, return -1; } +/** + * Add the physical_block_size and logical_block_size elements of the C<-device> + * parameter. + */ +static int +add_device_blocksize_params (guestfs_h *g, struct qemuopts *qopts, + struct drive *drv) +{ + if (drv->blocksize) { + append_list_format ("physical_block_size=%d", drv-...
2013 Dec 18
1
Initial support for sector size >512
On 12/16/2013 05:18 AM, Frediano Ziglio wrote: > > Surely should apply to 4.xx where they was developed but I think I send > them for 5.xx. mbr part of patches was merged time ago. > Unfortunately I had no time to update other patches. If I remember there > was a problem on the way ADV was implemented (using the same sector). > > Unfortunately my company business required to
2018 Aug 09
0
Re: Windows Guest I/O performance issues (already using virtio) (Matt Schumacher)
...ized CPU model make sense? I defined Haswell-noTSX-IBRS and libvirt added the features. > 4. Which kernel branch offers the best stability and performance? > 5. Are there performance gains in using UEFI booting the windows guest and defining ?<blockio logical_block_size='4096' physical_block_size='4096'/>?? Perhaps better block size consistency through to the zvol? > > >Here is my setup: > >48 core Haswell CPU >192G Ram >Linux 4.14.61 or 4.9.114 (testing both) >ZFS file system on optane SSD drive or ZFS file system on dumb HBA with 8 spindles of 15k disks...