search for: start_sector

Displaying 20 results from an estimated 62 matches for "start_sector".

2019 Mar 20
0
[PATCH nbdkit 7/8] vddk: Implement extents.
...clude "rounding.h" #include "vddk-structs.h" @@ -67,6 +69,8 @@ static VixError (*VixDiskLib_GetInfo) (VixDiskLibHandle handle, VixDiskLibInfo * static void (*VixDiskLib_FreeInfo) (VixDiskLibInfo *info); static VixError (*VixDiskLib_Read) (VixDiskLibHandle handle, uint64_t start_sector, uint64_t nr_sectors, unsigned char *buf); static VixError (*VixDiskLib_Write) (VixDiskLibHandle handle, uint64_t start_sector, uint64_t nr_sectors, const unsigned char *buf); +static VixError (*VixDiskLib_QueryAllocatedBlocks) (VixDiskLibHandle diskHandle, uint64_t start_sector, uint64_t nr_secto...
2019 Jan 21
0
[PATCH nbdkit v2 2/4] partition filter: Support MBR logical partitions.
...ing.h" +#include "isaligned.h" #include "partition.h" +/* See also linux.git/block/partitions/msdos.c:is_extended_partition */ +#define is_extended(byte) ((byte) == 0x5 || (byte) == 0xf || (byte) == 0x85) + struct mbr_partition { uint8_t part_type_byte; uint32_t start_sector; @@ -69,16 +75,16 @@ find_mbr_partition (struct nbdkit_next_ops *next_ops, void *nxdata, { int i; struct mbr_partition partition; + uint32_t ep_start_sector, ep_nr_sectors; + uint64_t ebr, next_ebr; + uint8_t sector[SECTOR_SIZE]; - if (partnum > 4) { - nbdkit_error ("MBR log...
2019 Jan 20
5
[PATCH nbdkit 0/4] partition: Support MBR logical partitions.
This implements support for MBR logical partitions in nbdkit-partition-filter, complementing existing support in the partitioning plugin. Rich.
2020 Jun 02
0
[PATCH nbdkit 4/5] tests: Enhance dummy-vddk.
...VixDiskLibInfo **info) +{ + *info = calloc (1, sizeof (struct VixDiskLibInfo)); + (*info)->capacity = CAPACITY; + return VIX_OK; +} + +void +VixDiskLib_FreeInfo (VixDiskLibInfo *info) +{ + free (info); +} + +VixError +VixDiskLib_Read (VixDiskLibHandle handle, + uint64_t start_sector, uint64_t nr_sectors, + unsigned char *buf) +{ + size_t offset = start_sector * VIXDISKLIB_SECTOR_SIZE; + + memcpy (buf, disk + offset, nr_sectors * VIXDISKLIB_SECTOR_SIZE); + return VIX_OK; +} + +VixError +VixDiskLib_Write (VixDiskLibHandle handle, + uint64_t st...
2011 Apr 05
0
[PATCH] Btrfs: don't split dio bios if we don't have to
...s/inode.c b/fs/btrfs/inode.c index 3476760..8b82309 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5960,13 +5960,6 @@ static int btrfs_submit_direct_hook(int rw, struct btrfs_dio_private *dip, u32 *csums = dip->csums; int ret = 0; - bio = btrfs_dio_bio_alloc(orig_bio->bi_bdev, start_sector, GFP_NOFS); - if (!bio) - return -ENOMEM; - bio->bi_private = dip; - bio->bi_end_io = btrfs_end_dio_bio; - atomic_inc(&dip->pending_bios); - map_length = orig_bio->bi_size; ret = btrfs_map_block(map_tree, READ, start_sector << 9, &map_length, NULL, 0); @@ -5...
2019 Jan 22
2
Re: [PATCH nbdkit v2 2/4] partition filter: Support MBR logical partitions.
...tests/test-partitioning1.sh | 22 +++- > 3 files changed, 121 insertions(+), 11 deletions(-) > > @@ -69,16 +75,16 @@ find_mbr_partition (struct nbdkit_next_ops *next_ops, void *nxdata, > { > int i; > struct mbr_partition partition; > + uint32_t ep_start_sector, ep_nr_sectors; > + uint64_t ebr, next_ebr; > + uint8_t sector[SECTOR_SIZE]; > > - if (partnum > 4) { > - nbdkit_error ("MBR logical partitions are not supported"); > - return -1; > - } > - > + /* Primary partition. */ > for (i = 0; i <...
2019 Mar 23
2
Re: [PATCH nbdkit 7/8] vddk: Implement extents.
...n(-) > > +static int > +vddk_extents (void *handle, uint32_t count, uint64_t offset, uint32_t flags, > + struct nbdkit_extents *extents) > +{ > + struct vddk_handle *h = handle; > + bool req_one = flags & NBDKIT_FLAG_REQ_ONE; > + uint64_t position, end, start_sector; > + > + position = offset; > + ... > + > + for (i = 0; i < block_list->numBlocks; ++i) { > + uint64_t offset, length; > + > + offset = block_list->blocks[i].offset * VIXDISKLIB_SECTOR_SIZE; > + length = block_list->blocks[i].length * VIXDIS...
2019 Jan 22
7
[PATCH nbdkit v3 0/5] partition filter: Support MBR logical partitions.
I think this addresses everything in Eric's v2 review. Note that the first patch is best viewed using ‘-w’ to ignore whitespaces changes. Rich.
2019 Jan 21
8
[PATCH nbdkit v2 0/4] Support MBR logical partitions.
This is a revised version of the two series previously posted here: https://www.redhat.com/archives/libguestfs/2019-January/msg00137.html https://www.redhat.com/archives/libguestfs/2019-January/msg00139.html There have been many smaller changes but the highlights are: - Using SECTOR_SIZE instead of hard-coding 512 everywhere. - Additional safety checks that the EBR chain doesn't jump
2011 Mar 28
22
[PATCH 00/22] Staging: hv: Cleanup-storage-drivers-phase-III
This patch-set deals with some of the style isues in blkvsc_drv.c. We also get rid most of the "dead code" in this file: 1) Get rid of most of the forward declarations in this file. The only remaining forward declarations are to deal with circular dependencies. 2) Get rid of most of the dead code in the file. Some of the functions in this file are place holders - they
2011 Mar 28
22
[PATCH 00/22] Staging: hv: Cleanup-storage-drivers-phase-III
This patch-set deals with some of the style isues in blkvsc_drv.c. We also get rid most of the "dead code" in this file: 1) Get rid of most of the forward declarations in this file. The only remaining forward declarations are to deal with circular dependencies. 2) Get rid of most of the dead code in the file. Some of the functions in this file are place holders - they
2019 Apr 29
0
[nbdkit PATCH 1/3] vddk: Use a separate handle for single-link=true
...&block_list); @@ -809,7 +827,7 @@ vddk_extents (void *handle, uint32_t count, uint64_t offset, uint32_t flags, "handle, %" PRIu64 " sectors, %" PRIu64 " sectors, " "%d sectors", start_sector, nr_sectors, VIXDISKLIB_MIN_CHUNK_SIZE); - err = VixDiskLib_QueryAllocatedBlocks (h->handle, + err = VixDiskLib_QueryAllocatedBlocks (single_link ? h->handle_single_link : h->handle, start_sector, nr_sectors,...
2020 Aug 06
5
[PATCH nbdkit NOT WORKING 0/2] vddk: Relax threading model.
I believe this roughly implements Nir's proposal here: https://www.redhat.com/archives/libguestfs/2020-August/msg00028.html Unfortunately it doesn't work for me. It actually slows things down quite a lot, for reasons I don't understand. Note the adjustment of the pool-max parameter and how it affects the total time. The results are quite reproducible. $ ./nbdkit -r -U - vddk
2020 Aug 06
0
[PATCH nbdkit 2/2] vddk: Relax thread model to PARALLEL and implement a disk handle pool.
...e, uint32_t count, uint64_t offset, uint32_t flags, struct nbdkit_extents *extents) { - struct vddk_handle *h = handle; + struct handle *h = handle; + GET_VDDK_HANDLE_FOR_CURRENT_SCOPE (h, vddk_handle); bool req_one = flags & NBDKIT_FLAG_REQ_ONE; uint64_t position, end, start_sector; @@ -896,7 +1009,7 @@ vddk_extents (void *handle, uint32_t count, uint64_t offset, uint32_t flags, "handle, %" PRIu64 " sectors, %" PRIu64 " sectors, " "%d sectors", start_sector, nr_sectors, VIXDISKLIB_MIN...
2023 Apr 07
2
[PATCH 0/2] vdpa_sim_blk: support shared backend
This series is mainly for testing live migration between 2 vdpa_sim_blk devices. The first patch is preparation and moves the buffer allocation into devices, the second patch adds the `shared_buffer_mutex` parameter to vdpa_sim_blk to use the same ramdisk for all devices. Tested with QEMU v8.0.0-rc2 in this way: modprobe vhost_vdpa modprobe vdpa_sim_blk shared_backend=true vdpa dev add mgmtdev
2019 Mar 20
15
[PATCH nbdkit 0/8] Implement extents using a simpler array.
Not sure what version we're up to, but this reimplements extents using the new simpler structure described in this thread: https://www.redhat.com/archives/libguestfs/2019-March/msg00077.html I also fixed most of the things that Eric pointed out in the previous review, although I need to go back over his replies and check I've got everything. This needs a bit more testing. However the
2020 Aug 06
3
Re: [PATCH nbdkit 2/2] vddk: Relax thread model to PARALLEL and implement a disk handle pool.
...32_t > flags, > struct nbdkit_extents *extents) > { > - struct vddk_handle *h = handle; > + struct handle *h = handle; > + GET_VDDK_HANDLE_FOR_CURRENT_SCOPE (h, vddk_handle); > bool req_one = flags & NBDKIT_FLAG_REQ_ONE; > uint64_t position, end, start_sector; > > @@ -896,7 +1009,7 @@ vddk_extents (void *handle, uint32_t count, uint64_t > offset, uint32_t flags, > "handle, %" PRIu64 " sectors, %" PRIu64 " sectors, " > "%d sectors", > start_sector...
2019 Apr 29
5
[nbdkit PATCH 0/3] Fix data integrity in vddk plugin
Couple of fixes to return correct data and one nice-to-have clean-up which is not needed. I just find it nicer to read. Martin Kletzander (3): vddk: Use a separate handle for single-link=true vddk: Do not report hole extents to be zero with single-link=true vddk: Eliminate one needless goto plugins/vddk/vddk.c | 48 +++++++++++++++++++++++++++++++++------------ 1 file changed, 36
2019 Mar 26
21
[PATCH nbdkit v4 00/15] Implement Block Status.
I'm not sure exactly which version we're up to, but let's say it's version 4. I'm a lot happier with this version: - all filters have been reviewed and changed where I think that's necessary - can_extents is properly defined and implemented now - NBD protocol is followed - I believe it addresses all previous review points where possible The "only" thing
2019 Mar 25
0
Re: [PATCH nbdkit 7/8] vddk: Implement extents.
...iment with breaking earlier from the inner loop. I need to do a lot more testing on this patch anyway. Rich. > > + } > > + DEBUG_CALL ("VixDiskLib_FreeBlockList", "block_list"); > > + VixDiskLib_FreeBlockList (block_list); > > + > > + start_sector += nr_sectors; > > + > > + if (req_one) > > + break; > > just as you break the outer loop here, to make REQ_ONE slightly faster. > > Otherwise looks sane. m not in a position to test it, but if 'qemu-img > map --output=json nbd://...' pointing to y...