search for: bpb

Displaying 20 results from an estimated 41 matches for "bpb".

Did you mean: bp
2018 Dec 03
1
Re: [PATCH nbdkit v2] common: Move shared bitmap code to a common library.
...gt; +int > +bitmap_resize (struct bitmap *bm, uint64_t new_size) > +{ > + uint8_t *new_bitmap; > + const size_t old_bm_size = bm->size; > + uint64_t new_bm_size_u64; > + size_t new_bm_size; > + > + new_bm_size_u64 = DIV_ROUND_UP (new_size, bm->blksize * 8 / bm->bpb); Can the computation of bm->blksize * 8 overflow? (blksize is 32-bit unsigned; did initialization clamp block size to less than 512M?). But appears to be unchanged in the refactor, and at most a pre-existing issue. If so, write bm->blksize * UINT64_C(8) / bm->bpb or similar. > d...
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.
2019 Jan 01
0
[PATCH nbdkit v2 1/4] common/bitmap: Add bitmap_next function and tests.
...3..80fd5e4 100644 --- a/common/bitmap/bitmap.h +++ b/common/bitmap/bitmap.h @@ -165,4 +165,10 @@ bitmap_set (const struct bitmap *bm, uint64_t offset, unsigned v) #define bitmap_for(bm, /* uint64_t */ blknum) \ for ((blknum) = 0; (blknum) < (bm)->size * (bm)->ibpb; ++(blknum)) +/* Find the next non-zero block in the bitmap, starting at ?blk?. + * Returns -1 if the bitmap is all zeroes from blk to the end of the + * bitmap. + */ +extern int64_t bitmap_next (const struct bitmap *bm, uint64_t blk); + #endif /* NBDKIT_BITMAP_H */ diff --git a/common/include/i...
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 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 01
0
[PATCH nbdkit] common: Move shared bitmap code to a common library.
....h" +#include "rounding.h" + +int +bitmap_resize (struct bitmap *bm, uint64_t new_size) +{ + uint8_t *new_bitmap; + const size_t old_bm_size = bm->size; + uint64_t new_bm_size_u64; + size_t new_bm_size; + + new_bm_size_u64 = DIV_ROUND_UP (new_size, bm->blksize * 8 / bm->bpb); + if (new_bm_size_u64 > SIZE_MAX) { + nbdkit_error ("bitmap too large for this architecture"); + return -1; + } + new_bm_size = (size_t) new_bm_size_u64; + + new_bitmap = realloc (bm->bitmap, new_bm_size); + if (new_bitmap == NULL) { + nbdkit_error ("realloc: %m...
2018 Dec 02
0
[PATCH nbdkit v2] common: Move shared bitmap code to a common library.
....h" +#include "rounding.h" + +int +bitmap_resize (struct bitmap *bm, uint64_t new_size) +{ + uint8_t *new_bitmap; + const size_t old_bm_size = bm->size; + uint64_t new_bm_size_u64; + size_t new_bm_size; + + new_bm_size_u64 = DIV_ROUND_UP (new_size, bm->blksize * 8 / bm->bpb); + if (new_bm_size_u64 > SIZE_MAX) { + nbdkit_error ("bitmap too large for this architecture"); + return -1; + } + new_bm_size = (size_t) new_bm_size_u64; + + new_bitmap = realloc (bm->bitmap, new_bm_size); + if (new_bitmap == NULL) { + nbdkit_error ("realloc: %m...
2018 Dec 03
0
[PATCH nbdkit v3] common: Move shared bitmap code to a common library.
...tmap are + * initialized to 0. + */ + +#ifndef NBDKIT_BITMAP_H +#define NBDKIT_BITMAP_H + +#include <stdint.h> +#include <assert.h> + +#include "ispowerof2.h" + +/* This is the bitmap structure. */ +struct bitmap { + unsigned blksize; /* Block size. */ + unsigned bpb; /* Bits per block (1, 2, 4, 8 only). */ + /* bpb = 1 << bitshift ibpb = 8/bpb + 1 0 8 + 2 1 4 + 4 2 2 + 8 3 1 + */ + unsigned bitshift, ibpb; + + uint8_t *bitmap; /* The...
2010 Jul 26
5
[RFC/PATCH] New chainloading functionality
This patch introduces extra functionality to chain.c, mainly with reference to BPB adjustments, but not only that. It expects 3 small patches I sent earlier (they are included for easy reference, patches 1-3/4). The changes introduced are: 1) file and boot sector use separate options to control load address and jump address (if applicable). Options are as described below: * s...
2019 Jan 01
7
[PATCH nbdkit v2 0/4] cache: Implement cache-max-size etc.
These are essentially identical to what was previously posted as patches 6/9 through 9/9 here: https://www.redhat.com/archives/libguestfs/2018-December/msg00145.html except that it has been rebased onto the current git master and retested thoroughly. Rich.
2010 Jul 20
1
Possible improvements for chain.c
...lesystem, not partition type flag in mbr - this is the same issue as once described in this thread - http://syslinux.zytor.com/archives/2006-September/007286.html ). Putting aside wicked bioses, I also have freedos on the same partition for different/weird/legacy purposes. Here the fun begins - BPB of syslinux partition has obviously zip geometry (32/64). When the stick is treated as USB HDD, some of the bioses use other geometries than the zip one. In such case regardless of the method (chain.c32 from sector or kernel file, bss) - booting of course didn't work. Freedos (or at least...
2023 Jun 01
2
Failed to convert SID to a UID
...ior) versions but I?m encountering the exact same issue you are with nearly the exact same setup/configuration. Is this something to do with the 4.17.5 version, or did you determine it is unique to your setup? I?m wondering if downgrading the Samba package is an effective way to work around this. BPB
2010 Nov 26
1
[PATCH] new *br: Show handoff data
git://git.zytor.com/users/genec/syslinux.git Branch handoff-mbr-for-hpa This is a piece of code that can be used in place of a MBR or VBR/PBR (master boot record; volume/partition) in order to examine the data handed to the respective boot code. AX, SS, and SP are destroyed before examining anything. I set an internal restriction that limits it to 420 bytes such that it could be used with a
2019 Sep 01
11
[nbdkit PATCH 00/10] Avoid -Wshadow
While working on can_FOO caching, at one point I got confused by whether 'readonly' meant the global set by -r or a local passed to .open(). A quick attempt to compile with -Wshadow found several other confusing points; this series gets us to the point that we can add -Wshadow to builds with --enable-gcc-warnings. Eric Blake (10): server: Avoid -Wshadow warnings guestfs: Avoid
2018 Dec 28
12
[PATCH nbdkit 0/9] cache: Implement cache-max-size and method of reclaiming space from the cache.
This patch series enhances the cache filter in a few ways, primarily adding a "cache-on-read" feature (similar to qemu's copyonread); and adding the ability to limit the cache size and the antecedent of that which is having a method to reclaim cache blocks. As the cache is stored as a sparse temporary file, reclaiming cache blocks simply means punching holes in the temporary file.
2017 Feb 20
3
[PATCH] Correct chain.c32 v. 6.04-pre1 for Reactos
...a filename extension ending with ".S". There is also "multiboot.S", FWIW. Regards, Ady. diff U3 com32/chain/options.c com32/chain/options.c --- com32/chain/options.c Wed Mar 02 07:06:29 2016 +++ com32/chain/options.c Mon Feb 18 19:19:29 2017 @@ -224,15 +224,9 @@ opt.setbpb = true; opt.hand = false; } else if (!strncmp(argv[i], "reactos=", 8)) { - /* - * settings based on commit - * ad4cf1470977f648ee1dd45e97939589ccb0393c - * note, conflicts with: - * http://reactos.freedoors.org/Reactos%200.3.13/ReactOS-0.3.13-REL-src/bo...
2019 Apr 11
2
Question of syslinux chainloading
On 2019-4-10 1:20, Ady Ady via Syslinux wrote: >>>> #This item fails >>>> label dos >>>> menu label MS-^DOS 7.1 >>>> com32 chain.c32 msdos7=io.sys >> >> IO.SYS and COMMAND.COM are copied from a Windows98 system on another >> computer, which is MSDOS7.1; and BOOTSECT.W98 is from Bootpart tool (I >> compared it with the one from
2013 Oct 18
0
[RFC/PATCH 1/3] Move partiter from com32/chain to com32/lib/syslinux
...lude <fcntl.h> -#include <stdint.h> -#include <stdio.h> -#include <errno.h> -#include <unistd.h> -#include <string.h> -#include <fs.h> -#include <syslinux/disk.h> -#include <syslinux/pmapi.h> -#include "utility.h" - -static const char *bpbtypes[] = { - [0] = "unknown", - [1] = "2.0", - [2] = "3.0", - [3] = "3.2", - [4] = "3.4", - [5] = "4.0", - [6] = "8.0 (NT+)", - [7] = "7.0", - [8] = "exFAT", -}; - -void wai...
2012 Nov 06
50
chain.c32 (and partiter) updates v2
...chines - tolerate and handle hybrid GPT+MBR layouts, add prefmbr flag This recognizes disks with both layouts at the same time, and introduces 'prefmbr' flag to force the use of MBR layout in case GPT is present. - recognize exFAT This makes chain exFAT aware by adding yet another "BPB" variation with the usual stuff (partition offset - now 64bit, drive). - com32/chain: manglepe_fixchs() correction Previously fixchs also included start/length 0/0 entries (holes), so this patch makes it a bit more careful. - use disk_guid for part_guid for 0th partition (under GPT layouts)...
2015 Jul 22
0
[PULL 1/8] Move partiter from com32/chain to com32/lib/syslinux
...lude <fcntl.h> -#include <stdint.h> -#include <stdio.h> -#include <errno.h> -#include <unistd.h> -#include <string.h> -#include <fs.h> -#include <syslinux/disk.h> -#include <syslinux/pmapi.h> -#include "utility.h" - -static const char *bpbtypes[] = { - [0] = "unknown", - [1] = "2.0", - [2] = "3.0", - [3] = "3.2", - [4] = "3.4", - [5] = "4.0", - [6] = "8.0 (NT+)", - [7] = "7.0", - [8] = "exFAT", -}; - -void wai...