Skip to contentSkip to conversation

btrfs: Make async snapshot ioctl more generic

PATCH Goffredo Baroncelli 1 participant 1 message Nov 29, 2010 Btrfs file system

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines · Goffredo Baroncelli

Why the unused fields ? What happens if you use a more recent btrfs-tools which take advantage of these fields but the kernel is an old one ? At the minimum please check the flags so

        (flags^(BTRFS_SNAPSHOT_CREATE_ASYNC|BTRFS_SNAPSHOT_RDONLY)) == 0
and
        unused[0..3] == 0

Sorry, the check should be

(flags & (~(BTRFS_SNAPSHOT_CREATE_ASYNC|BTRFS_SNAPSHOT_RDONLY))) == 0

Quoted 2 lines

For future expansion I suggest to use a different ioctl. To me it seems a

more

Quoted 2 lines

robust API.

Signature · 2 lines
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <[email protected]>
Key fingerprint = 4769 7E51 5293 D36C 814E  C054 BF04 F161 3DC5 0512