Re: [PATCH v2 0/3] implement zone-aware probing/wiping for zoned btrfs

2021-04-14 Thread Karel Zak
d a test to our test suite. Karel -- Karel Zak http://karelzak.blogspot.com

Re: [PATCH v2 3/3] blkid: support zone reset for wipefs

2021-04-14 Thread Karel Zak
d_do_wipe: > * @pr: prober > @@ -1267,6 +1310,7 @@ int blkid_do_wipe(blkid_probe pr, int dryrun) > const char *off = NULL; > size_t len = 0; > uint64_t offset, magoff; > + bool conventional; BTW, nowhere in libblkid we use "bool". It would be probably better to include to blkidP.h. Karel -- Karel Zak http://karelzak.blogspot.com

Re: [PATCH v2 2/3] blkid: add magic and probing for zoned btrfs

2021-04-14 Thread Karel Zak
gt; + *bytenr_ret = zones[1].start << SECTOR_SHIFT; > + ret = 0; > + goto out; > + } what about: for (i = 0; i < BTRFS_NR_SB_LOG_ZONES; i++) { if (zones[i].type == BLK_ZONE_TYPE_CONVENTIONAL) { *bytenr_ret = zones[i].start << SECTOR_SHIFT; ret = 0; goto out; } } Karel -- Karel Zak http://karelzak.blogspot.com

Re: [PATCH v2 1/3] blkid: implement zone-aware probing

2021-04-14 Thread Karel Zak
int fd, > pr->wipe_off = 0; > pr->wipe_size = 0; > pr->wipe_chain = NULL; > + pr->zone_size = 0; you also need to update blkid_clone_probe() function Karel -- Karel Zak http://karelzak.blogspot.com

Re: Ideas on unified real-ro mount option across all filesystems

2015-12-17 Thread Karel Zak
with the ro,noload mount options or set the block device itself to read-only mode, see the blockdev(8) command. (maybe we need to copy this note to "ro" description too and add hint about btrfs too :-) Karel -- Karel Zak http://karelzak.blogspot.com -- To unsubsc

Re: [PATCH] btrfs-progs: Fix partitioned loop devices resolve.

2015-11-10 Thread Karel Zak
On Tue, Nov 10, 2015 at 09:35:22AM +0100, Florian Margaine wrote: > > > On 11/09/2015 03:12 PM, Karel Zak wrote: > > On Mon, Nov 09, 2015 at 02:06:26PM +0100, Florian Margaine wrote: > >> Instead of using string functions to extract the device name and reading > >&g

Re: [PATCH] btrfs-progs: Fix partitioned loop devices resolve.

2015-11-09 Thread Karel Zak
_STATUS64 ioctl as fallback solution only. Karel -- Karel Zak http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: bad handling of unpartitioned device in sysfs_devno_to_wholedisk() (which breaks mkfs.btrfs)

2015-10-30 Thread Karel Zak
legant as it uses devname buffer for readlink. Fixed, the bugfix will be in v2.27.1. Thanks! Karel -- Karel Zak http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: mount command now shows subvol and subvolid

2015-09-01 Thread Karel Zak
subvolid=5 is indeed constant > (and actually useful given the following), subvol= turns out to be rather > more helpful than the / that would normally be expected. > > I have a number of bind-mounts. Formerly mount's output for these wasn't > particularly helpful, since I

Re: i_version vs iversion (Was: Re: [RFC PATCH v2 1/2] Btrfs: add noi_version option to disable MS_I_VERSION)

2015-06-19 Thread Karel Zak
PI (include/uapi/linux/fs.h) so I guess it's fine to support it in mount(8). Karel -- Karel Zak http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in

Re: btrfs-prog: improve build-system by autoconf

2015-02-04 Thread Karel Zak
learn something new. Yes, people hate this thing :-) I guess we will see more and more stuff in btrfs-progs, so it's better to the change now than later. See e2fsprogs (sorry Ted), it's result of "automake only obfuscates", many Makefile.in files, '@' everywh

Re: btrfs-prog: improve build-system by autoconf

2015-01-16 Thread Karel Zak
On Wed, Dec 17, 2014 at 03:07:26PM +0100, David Sterba wrote: > On Fri, Dec 12, 2014 at 01:35:14PM +0100, Karel Zak wrote: > > This is first step to make btrfs-progs build system more conventional > > for userspace users and developers. All is implemented by small incremental >

Re: btrfs-prog: improve build-system by autoconf

2014-12-18 Thread Karel Zak
On Wed, Dec 17, 2014 at 03:07:26PM +0100, David Sterba wrote: > On Fri, Dec 12, 2014 at 01:35:14PM +0100, Karel Zak wrote: > > This is first step to make btrfs-progs build system more conventional > > for userspace users and developers. All is implemented by small incremental >

[PATCH 01/10] btrfs-progs: add ./configure script

2014-12-12 Thread Karel Zak
Add ./autogen.sh script, you have to use it after "git clone/clean" to generate ./configure from configure.ac. Modify version.sh to be usable from the configure script. The patch also renames Makefile to Makefile.in, but does NOT change anything in the file. Signed-off-by:

[PATCH 03/10] btrfs-progs: use standard PACKAGE_* macros

2014-12-12 Thread Karel Zak
"btrfs ". Signed-off-by: Karel Zak --- btrfs-calc-size.c | 1 - btrfs-corrupt-block.c | 1 - btrfs-debug-tree.c| 5 ++--- btrfs-find-root.c | 1 - btrfs-image.c | 1 - btrfs-map-logical.c | 1 - btrfs-select-super.c | 3 +-- btrfs-show-super.c| 3 +-- btr

[PATCH 08/10] btrfs-progs: clean generated files, make version.h stuff more robust

2014-12-12 Thread Karel Zak
- add rule to generated version.h when any relevant stuff changed - add rule to clean generated files on "make clean-all" Signed-off-by: Karel Zak --- Makefile.in | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index 58200c

[PATCH 10/10] btrfs-progs: add --disable-documentation

2014-12-12 Thread Karel Zak
Signed-off-by: Karel Zak --- Makefile.in | 1 + configure.ac | 9 + 2 files changed, 10 insertions(+) diff --git a/Makefile.in b/Makefile.in index bdd7683..5889224 100644 --- a/Makefile.in +++ b/Makefile.in @@ -5,6 +5,7 @@ CC = @CC@ LN_S = @LN_S@ AR = @AR@ INSTALL = @INSTALL

[PATCH 07/10] btrfs-progs: cleanup compilation flags usage

2014-12-12 Thread Karel Zak
#x27;t use AM_CFLAGS, the CFLAGS and STATIC_CFLAGS are enough - don't mix objects and flags in $LIBS, it's more readable to add $(libs) to make rules Signed-off-by: Karel Zak --- Makefile.in | 67 +++- configure.ac | 2 ++

[PATCH 05/10] btrfs-progs: check for build programs in ./configure

2014-12-12 Thread Karel Zak
Signed-off-by: Karel Zak --- Makefile.in | 12 ++-- configure.ac | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile.in b/Makefile.in index dad1685..17eea58 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,9 +1,9 @@ # Export all variables to sub-makes by

[PATCH 09/10] btrfs-progs: add --disable-backtrace

2014-12-12 Thread Karel Zak
It's better to use ./configure than manually edit Makefile. Signed-off-by: Karel Zak --- Makefile.in | 4 configure.ac | 10 ++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in index df752d3..bdd7683 100644 --- a/Makefile.in

[PATCH 04/10] btrfs-progs: use ./configure to generate version.h

2014-12-12 Thread Karel Zak
The original homemade solution is unnecessary, autotools provides better infrastructure to generate files. Signed-off-by: Karel Zak --- Makefile.in | 4 configure.ac | 9 + version.h.in | 11 +++ version.sh | 30 +++--- 4 files changed, 23

[PATCH 02/10] btrfs-progs: use config.h

2014-12-12 Thread Karel Zak
Signed-off-by: Karel Zak --- Makefile.in | 4 +++- btrfs-calc-size.c | 1 - btrfs-convert.c | 1 - btrfs-corrupt-block.c | 2 +- btrfs-find-root.c | 2 +- btrfs-fragments.c | 1 - btrfs-image.c | 2 +- btrfs-list.c | 1 - btrfs-map-logical.c | 2

[PATCH 06/10] btrfs-progs: use paths and $*_LIBS from ./configure

2014-12-12 Thread Karel Zak
Signed-off-by: Karel Zak --- Makefile.in | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile.in b/Makefile.in index 17eea58..df590ab 100644 --- a/Makefile.in +++ b/Makefile.in @@ -26,11 +26,11 @@ libbtrfs_headers = send-stream.h send-utils.h send.h rbtree.h

btrfs-prog: improve build-system by autoconf

2014-12-12 Thread Karel Zak
This is first step to make btrfs-progs build system more conventional for userspace users and developers. All is implemented by small incremental patches to keep things review-able. The Makefile targets and rules are no changed, things like V=1 (verbose), C=1 (sparse) static builds, etc. still wor

[PATCH] btrfs-progs: fix typedef

2014-12-12 Thread Karel Zak
Signed-off-by: Karel Zak --- kerncompat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kerncompat.h b/kerncompat.h index 8afadc8..5c1cca9 100644 --- a/kerncompat.h +++ b/kerncompat.h @@ -123,7 +123,7 @@ typedef unsigned long long u64; typedef unsigned char u8; typedef

Re: [PATCH 2/2 v4] btrfs-progs: optimize btrfs_scan_lblkid() for multiple calls

2014-11-28 Thread Karel Zak
On Fri, Nov 14, 2014 at 05:51:27PM +0100, David Sterba wrote: > On Tue, Nov 11, 2014 at 12:47:35PM +0100, Karel Zak wrote: > > What I see critical is missing ./configure, because it's pretty ugly > > to add hardcoded dependencies (e.g. libudev), there is also no checks &

[PATCH 2/2] btrfs-progs: use udev to scan for devices (v2)

2014-11-11 Thread Karel Zak
real0m0.076s user0m0.008s sys 0m0.024s V2: - use udev_enumerate_add_match_property() Signed-off-by: Karel Zak --- Makefile | 2 +- utils.c | 104 --- 2 files changed, 81 insertions(+), 25

Re: [PATCH 2/2 v4] btrfs-progs: optimize btrfs_scan_lblkid() for multiple calls

2014-11-11 Thread Karel Zak
On Fri, Oct 31, 2014 at 07:04:58PM +0800, Anand Jain wrote: > > > > > On 31/10/2014 17:08, Karel Zak wrote: > >On Fri, Oct 31, 2014 at 12:11:20PM +0800, Anand Jain wrote: > >>btrfs_scan_lblikd() is called by most the device related command functions. >

[PATCH 2/2] btrfs-progs: use udev to scan for devices

2014-11-11 Thread Karel Zak
real0m0.076s user0m0.008s sys 0m0.024s Signed-off-by: Karel Zak --- Makefile | 2 +- utils.c | 107 +-- 2 files changed, 84 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index 203597

[PATCH 1/2] btrfs-progs: rename btrfs_scan_lblkid() to btrfs_scan_devices()

2014-11-11 Thread Karel Zak
It seems like bad idea to use a library name (lblkid) within generic function name. The currently used scanning library is implementation detail and this detail should be hidden for rest of the code. Signed-off-by: Karel Zak --- cmds-device.c | 2 +- cmds-filesystem.c | 2 +- disk-io.c

Re: [PATCH 2/2 v4] btrfs-progs: optimize btrfs_scan_lblkid() for multiple calls

2014-10-31 Thread Karel Zak
k devices and where we call libblkid. It would be possible to implement it as optional feature (#ifdev HAVE_LIBUDEV), the library API is very easy to use. (For example lsblk uses libblkid as fallback, the default is udev). Karel -- Karel Zak http://karelzak.blogspot.com -- To unsubscrib

Re: [PATCH] mount: add btrfs to mount.8

2014-06-09 Thread Karel Zak
On Sat, Jun 07, 2014 at 06:41:50AM -0700, Christoph Hellwig wrote: > On Fri, Jun 06, 2014 at 10:52:48AM -0500, Eric Sandeen wrote: > > On 6/6/14, 5:03 AM, Karel Zak wrote: > > > On Fri, Jun 06, 2014 at 11:44:28AM +0200, Karel Zak wrote: > > >> I personally have no p

Re: [PATCH] mount: add btrfs to mount.8

2014-06-06 Thread Karel Zak
d, thanks. Karel -- Karel Zak http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] mount: add btrfs to mount.8

2014-06-06 Thread Karel Zak
On Fri, Jun 06, 2014 at 11:44:28AM +0200, Karel Zak wrote: > I personally have no problem to maintain information about arbitrary > FS in mount.8, the problem are updates. Unfortunately, kernel FS developers > don't care about the man page at all and it's very often no

Re: [PATCH] mount: add btrfs to mount.8

2014-06-06 Thread Karel Zak
x27;t care if there is usable userpsace util or docs for users, people like Eric Biederman or Lukas Czerner are rare exception.] > And I think there are many btrfs developers who will be > glad to continue helping correct the btrfs part. OK, we can try it, if you still prefer mount.8.

Re: [PATCH] mount: add btrfs to mount.8

2014-06-05 Thread Karel Zak
from kernel docs (for example from asciidoc etc.) See 6 years old discussions: http://marc.info/?t=122767310200002&r=1&w=2 Karel -- Karel Zak http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message

Re: missing /sbin/fsck.btrfs

2014-01-06 Thread Karel Zak
ot;fsck -A" ignores filesystems without fsck. helpers. It only complains if you explicitly specify the device on command line (e.g. fsck /dev/sdb1). Karel -- Karel Zak http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in

Re: [systemd-devel] is mounting subvolumes with a read-only root subvolume allowed?

2013-11-14 Thread Karel Zak
is expected that the other subvolume must be mounted rw? This is known and pretty stupid issue: http://www.spinics.net/lists/linux-btrfs/msg25502.html ... but it seems that btrfs guys are fine with this "feature". Karel -- Karel Zak http://karelzak.blogspot.com -- To unsubs

Re: [PATCH] btrfs: document mount options in Documentation/fs/btrfs.txt

2013-03-26 Thread Karel Zak
ls package must be installed). > I think kernel docs are the right place for the developers > to first document these things Definitely. Karel -- Karel Zak http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs&qu

Re: [PATCH] xfs_mkfs: wipe old signatures from the device

2013-02-13 Thread Karel Zak
s been already reported to btrfs guys: http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg20957.html and I don't see a reply "yep, this is btrfs-progs bug" :-) Karel -- Karel Zak http://karelzak.blogspot.com -- To unsubscribe from this list: send the line

Re: [PATCH][v2] Btrfs: wipe all the superblock [redhat bugzilla 889888]

2013-01-10 Thread Karel Zak
On Wed, Jan 09, 2013 at 10:14:43PM +0100, Goffredo Baroncelli wrote: > libblkid/src/superblocks/btrfs.c |8 > 1 file changed, 8 insertions(+) Applied, thanks. -- Karel Zak http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe

Re: Btrfs: wipe all the superblock [redhat bugzilla 889888]

2013-01-09 Thread Karel Zak
ystem (e.g. FAT). Please, send me the patch with the magic strings :-) I really don't want to add dummy filesystems to the library (like you did in the first version of the patch) -- it's very bad idea with many side effects. Karel -- Karel Zak http://karelzak.blogspot

Re: Btrfs: wipe all the superblock [redhat bugzilla 889888]

2013-01-08 Thread Karel Zak
ea behind wipefs(8), just wipe minimal number of bytes from the device to make the filesystem invisible for libblkid (udev, ...). This concept is relatively safe, if you make a mistake than you can restore the magic string, your data should not be affected by wipefs(8). Karel -- Karel Zak

Re: Btrfs: wipe all the superblock [redhat bugzilla 889888]

2013-01-08 Thread Karel Zak
me filesystem, the .magics = { } is array. .magics = { /* backup #1 */ { .magic = "_BHRfS_M", .len = 8, .kboff = 64 * 1024, .sboff = 0x40 }, }, /* backup #2 */ { .magic = "_BHRfS_M", .len = 8, .k

Re: [PATCH] Btrfs: do not mount when we have a sectorsize unequal to PAGE_SIZE

2012-04-03 Thread Karel Zak
NING "btrfs: Incompatible sector size(%lu) " > +"found on %s\n", (unsigned long)sectorsize, sb->s_id); That's strange. Does it mean that if I create the filesystem and then reboot to another kernel with different PAGE_SIZE then the filesystem is un

Re: "Invalid argument" when mounting a btrfs raid1 filesystem

2012-03-26 Thread Karel Zak
LVM, I don't think that btrfs has to repeat the same mistakes. Karel -- Karel Zak http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: LABEL only 1 device

2012-02-28 Thread Karel Zak
ls /dev/disk/by-partlabel/ ls /dev/disk/by-partuuid/ you can use these links in your fstab. And if I good remember kernel supports PARTUUID for root= command line option. Karel -- Karel Zak http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscr

Re: subvolume info in /proc/mounts

2012-02-06 Thread Karel Zak
is 'fs root' column, for bind mounts and btrfs subvolumes is there '/' (and '/' for normal mounts). findmnt(8) uses the path in SOURCE column, for example /dev/sda1[/subvolume]. Karel -- Karel Zak http://karelzak.blogspot.com -- To unsubscribe from t

Re: UUID of subvolumes

2010-04-08 Thread Karel Zak
ev_item.uuid, "UUID_SUB"); so there should be two UUIDs for the device. However, I'd like to see more information about btrfs UUIDs. BTW, see my old discussion with Andreas about UUIDs: http://marc.info/?l=linux-fsdevel&m=126754081900406&w=2 Karel -- Karel Zak

Re: [PATCH 1/2] btrfs-progs: multidevice support for check_mounted

2009-11-23 Thread Karel Zak
struct stat st_buf; > + > + if(stat(filename, &st_buf) < 0) { > + if(errno == ENOENT) > + return 0; > + else > + return -errno; > + } > + > + return (S_ISBLK(st_buf.st_mode) || S_ISREG(st_buf

Re: [PATCH 1/2] btrfs-progs: multidevice support for check_mounted

2009-11-21 Thread Karel Zak
mounts /sys /sys sysfs rw,relatime 0 0 Karel -- Karel Zak -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html