Using strncpy avoids a 1 byte overflow into the next field
of the struct. The overflow is harmless, but does
trip automated tools.
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
---
utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
btrfs_find_free_objectid may return a used objectid due to arithmetic
underflow. This bug may happen when parameter 'root' is tree root, so
it may cause serious problems when creating snapshot or sub-volume.
Hello,
This patch fixes two newly found bugs in the converter. The important
one is in create_ext2_image, sub-volume root directory's size not
properly updated after creating the ext2 image file. The other one is
a small bug in xattr support codes. In addition to the fixes, this
patch moves the 'if mounted' check to main() function.
Regards
YZ
---
This patch adds rollback support for the converter, the converter can
roll back a conversion if the image file haven't been modified. In
addition, I rearrange some codes in convert.c and add a few comments.
This patch ports extent buffer to btrfs-progs. extent_map.c contains a
simplified extent map tree and functions that manipulate/manage extent
buffer. extent state related codes are based on corresponding codes in
kernel module, codes that manage extent buffer are from disk-io.c.
Split CFLAGS into CFLAGS (user part) and AM_CFLAGS (not-so-user part;
variable name taken from automake, but otherwise no relation).
Also add LDFLAGS.
This allows me to use `make CFLAGS="-O2 -fPIE" LDFLAGS="-pie"` without
dropping the other important (AM_CFLAGS) flags.
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
---
btrfs-progs/Makefile | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
The dependency archive ".depend" is only created once.
Changing a C file's dependencies does not remake .depend,
so make will recompile either too few or too many things.
Use of per-.c file dependencies that are created and update
during compile solve this.
This is done by doing a two-step conversion (rather than a one-step).
First, the variable goes from type * to void *, and then to
implicitly to void **.
(Not sure if this is "good practice", but it shuts up the compiler,
so it seems the compiler takes into account that we are actually punning
it this way.)
This adds support for keeping track of the number of blocks used by
root_item's. This makes it so that mkfs lays down the "default" subvol with
the correct block accounting in place. Thank you,