search for: bm_offset

Displaying 15 results from an estimated 15 matches for "bm_offset".

Did you mean: m_offset
2018 Dec 01
0
[PATCH nbdkit] common: Move shared bitmap code to a common library.
...-1) { nbdkit_error ("ftruncate: %m"); @@ -246,36 +223,6 @@ cache_prepare (struct nbdkit_next_ops *next_ops, void *nxdata, return 0; } -/* Return true if the block is allocated. Consults the bitmap. */ -static enum bm_entry -blk_get_bitmap_entry (uint64_t blknum) -{ - uint64_t bm_offset = blknum / 4; - uint64_t bm_bit = 2 * (blknum % 4); - - if (bm_offset >= bm_size) { - nbdkit_debug ("blk_get_bitmap_entry: block number is out of range"); - return BLOCK_NOT_CACHED; - } - - return (bitmap[bm_offset] & (3 << bm_bit)) >> bm_bit; -} - -/* Update...
2018 Dec 02
0
[PATCH nbdkit v2] common: Move shared bitmap code to a common library.
...-1) { nbdkit_error ("ftruncate: %m"); @@ -246,36 +225,6 @@ cache_prepare (struct nbdkit_next_ops *next_ops, void *nxdata, return 0; } -/* Return true if the block is allocated. Consults the bitmap. */ -static enum bm_entry -blk_get_bitmap_entry (uint64_t blknum) -{ - uint64_t bm_offset = blknum / 4; - uint64_t bm_bit = 2 * (blknum % 4); - - if (bm_offset >= bm_size) { - nbdkit_debug ("blk_get_bitmap_entry: block number is out of range"); - return BLOCK_NOT_CACHED; - } - - return (bitmap[bm_offset] & (3 << bm_bit)) >> bm_bit; -} - -/* Update...
2018 Dec 03
0
[PATCH nbdkit v3] common: Move shared bitmap code to a common library.
...-1) { nbdkit_error ("ftruncate: %m"); @@ -246,36 +225,6 @@ cache_prepare (struct nbdkit_next_ops *next_ops, void *nxdata, return 0; } -/* Return true if the block is allocated. Consults the bitmap. */ -static enum bm_entry -blk_get_bitmap_entry (uint64_t blknum) -{ - uint64_t bm_offset = blknum / 4; - uint64_t bm_bit = 2 * (blknum % 4); - - if (bm_offset >= bm_size) { - nbdkit_debug ("blk_get_bitmap_entry: block number is out of range"); - return BLOCK_NOT_CACHED; - } - - return (bitmap[bm_offset] & (3 << bm_bit)) >> bm_bit; -} - -/* Update...
2018 Dec 01
2
[PATCH nbdkit] common: Move shared bitmap code to a common library.
I have some patches I'm working on to fix the cache filter. However this is a prelude. It should be simply pure refactoring. All tests pass still. Rich.
2018 Dec 03
3
[PATCH nbdkit v3] common: Move shared bitmap code to a common library.
v2: https://www.redhat.com/archives/libguestfs/2018-December/msg00039.html v2 -> v3: - Fix all the issues raised in Eric's review. - Precompute some numbers to make the calculations easier. - Calculations now use bitshifts and masks in preference to division and modulo. - Clear existing bits before setting (which fixes a bug in the cache filter). Rich.
2018 Dec 02
2
[PATCH nbdkit v2] common: Move shared bitmap code to a common library.
This is exactly the same as v1: https://www.redhat.com/archives/libguestfs/2018-December/msg00004.html except that it now frees the bitmap on unload (which the old code did not - there was always a memory leak). Rich.
2018 Jan 21
2
Re: [PATCH nbdkit] filters: Add copy-on-write filter.
...size (size)) + return -1; + return size; } @@ -200,6 +228,36 @@ cow_can_flush (struct nbdkit_next_ops *next_ops, void *nxdata, void *handle) return 1; } +/* Return true if the block is allocated. Consults the bitmap. */ +static bool +blk_is_allocated (uint64_t blknum) +{ + uint64_t bm_offset = blknum / 8; + uint64_t bm_bit = blknum % 8; + + if (bm_offset >= bm_size) { + nbdkit_debug ("blk_is_allocated: block number is out of range"); + return false; + } + + return bitmap[bm_offset] & (1 << bm_bit); +} + +/* Mark a block as allocated. */ +static void +bl...
2018 Jan 22
1
[PATCH nbdkit] filters: Add caching filter.
This adds a cache filter, which works like the COW filter in reverse. For realistic use it needs a bit more work, especially to add limits on the size of the cache, a more sensible cache replacement policy, and perhaps some kind of background worker to write dirty blocks out. Rich.
2010 Jun 29
0
Problem in migrating DRBD from CentOS4.4 to CentOS5.5
...lled LVM (/dev/mapper/vgroot-LogVol00 and /dev/mapper/vgroot-LogVol01) Partition and its not working We got the following errors on meta data creation ================================================= [root at corviewprimary ~]# drbdadm create-md drbd0 md_offset 13958639616 al_offset 13958606848 bm_offset 13958180864 Found ext3 filesystem 13631488 kB data area apparently used 13631036 kB left usable by current configuration Device size would be truncated, which would corrupt data and result in 'access beyond end of device' errors. You need to either * use external meta data (rec...
2018 Jan 20
4
[PATCH nbdkit] filters: Add copy-on-write filter.
Eric, you'll probably find the design "interesting" ... It does work, for me at least. Rich.
2020 Oct 27
0
Understanding 'State change failed: (-2) Need access to UpToDate data'
...internal meta data block. There appears to be a v08 flexible-size internal meta data block already in place on /dev/drbd11 at byte offset 429483581440 Do you really want to overwrite the existing meta-data? [need to type 'yes' to confirm] yes md_offset 429483581440 al_offset 429483548672 bm_offset 429470441472 Found some data  ==> This might destroy existing data! <== Do you want to proceed? [need to type 'yes' to confirm] yes initializing activity log NOT initializing bitmap Writing meta data... New drbd meta data block successfully created. :~# drbdadm up --stacked infor...
2009 Jun 21
1
Xen LVM DRBD live migration
...t@xen0 ~]# vgcreate -c n LVM /dev/sda5 Non-clustered volume group "LVM" successfully created [root@xen0 ~]# lvcreate -L 12G -n genxmonitor LVM Logical volume "genxmonitor" created [root@xen0 ~]# drbdadm create-md genxmonitor md_offset 12884897792 al_offset 12884865024 bm_offset 12884471808 Found some data ==> This might destroy existing data! <== Do you want to proceed? [need to type ''yes'' to confirm] yes You want me to create a v08 style flexible-size internal meta data block. There apears to be a v08 flexible-size internal meta data...
2010 Aug 09
2
HOWTO samba4 centos5.5 named dnsupdate drbd simple failover
...that gives you ?uname ?n? on your machine. ?r0? ist the resource we are using According to the /etc/drbd.conf you need to initiate your resource first before you can use it like: drbdadm create-md r0. Example: [root at node2 etc]# drbdadm create-md r0 md_offset 500105211904 al_offset 500105179136 bm_offset 500089913344 Found some data ==> This might destroy existing data! <== Do you want to proceed? [need to type 'yes' to confirm] yes You want me to create a v08 style flexible-size internal meta data block. There appears to be a v08 flexible-size internal meta data block already in...
2010 Aug 16
1
WG: HOWTO samba4 centos5.5 named dnsupdate drbd simple failover
...that gives you ?uname ?n? on your machine. ?r0? ist the resource we are using According to the /etc/drbd.conf you need to initiate your resource first before you can use it like: drbdadm create-md r0. Example: [root at node2 etc]# drbdadm create-md r0 md_offset 500105211904 al_offset 500105179136 bm_offset 500089913344 Found some data ==> This might destroy existing data! <== Do you want to proceed? [need to type 'yes' to confirm] yes You want me to create a v08 style flexible-size internal meta data block. There appears to be a v08 flexible-size internal meta data block already in...
2010 Oct 05
0
WG: HOWTO samba4 centos5.5 named dnsupdate drbd simple failover
...that gives you ?uname ?n? on your machine. ?r0? ist the resource we are using According to the /etc/drbd.conf you need to initiate your resource first before you can use it like: drbdadm create-md r0. Example: [root at node2 etc]# drbdadm create-md r0 md_offset 500105211904 al_offset 500105179136 bm_offset 500089913344 Found some data ==> This might destroy existing data! <== Do you want to proceed? [need to type 'yes' to confirm] yes You want me to create a v08 style flexible-size internal meta data block. There appears to be a v08 flexible-size internal meta data block already in...