Userspace utilities to manage btrfs filesystems
Go to file
Filipe David Borba Manana 1e6195885b Btrfs-progs: allow compression property gets for read-only subvolumes
Because the function open_file_or_dir() always opened the input file in
read/write mode (O_RDWR), we were not able to due a compression property
get against a file living in a read-only subvolume/snapshot.
Fix this by opening the file with O_RDONLY mode if we're doing a property
get.

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2014-05-02 17:03:21 +02:00
Documentation btrfs-progs: doc: link btrfsck to btrfs-check 2014-04-22 14:26:19 +02:00
tests
.gitignore btrfs-progs: Introduce asciidoc based man page and btrfs man page. 2014-04-22 14:15:19 +02:00
bcp
bitops.h
btrfs-calc-size.c btrfs-progs: free leaked roots in calc-size 2013-10-16 08:23:13 -04:00
btrfs-convert.c btrfs-progs: judge the return value of check_mounted more accurately 2014-03-21 06:23:21 -07:00
btrfs-corrupt-block.c Btrfs-progs: switch to arg_strtou64() part2 2014-03-21 06:23:19 -07:00
btrfs-crc.c
btrfs-debug-tree.c Btrfs-progs: switch to arg_strtou64() part2 2014-03-21 06:23:19 -07:00
btrfs-find-root.c Btrfs-progs: switch to arg_strtou64() part1 2014-03-21 06:23:19 -07:00
btrfs-fragments.c btrfs-progs: remove unused variables 2013-10-16 08:23:13 -04:00
btrfs-image.c Btrfs-progs: btrfs-image: don't call pthread_join on IDs not present 2014-04-22 14:33:31 +02:00
btrfs-list.c btrfs-progs: fix listing deleted subvolumes 2014-04-04 17:54:35 -07:00
btrfs-list.h btrfs-progs: Copyright string update 2014-03-21 06:23:24 -07:00
btrfs-map-logical.c Btrfs-progs: switch to arg_strtou64() part2 2014-03-21 06:23:19 -07:00
btrfs-select-super.c Btrfs-progs: switch to arg_strtou64() part3 2014-03-21 06:23:20 -07:00
btrfs-show-super.c Btrfs-progs: switch to arg_strtou64() part3 2014-03-21 06:23:20 -07:00
btrfs-zero-log.c Btrfs-progs: rework open_ctree to take flags, add a new one V2 2013-11-07 16:10:40 -05:00
btrfs.c Btrfs-progs: btrfs: remove dead code in handle_options 2014-04-11 19:05:40 +02:00
btrfsck.h btrfs-progs: Copyright string update 2014-03-21 06:23:24 -07:00
btrfstune.c btrfs-progs: judge the return value of check_mounted more accurately 2014-03-21 06:23:21 -07:00
chunk-recover.c Btrfs-progs: chunk_recovery: fix mem leak and pthread_cancel call 2014-04-22 14:33:44 +02:00
cmds-balance.c btrfs-progs: fix minor grammar issues 2014-01-31 08:22:28 -08:00
cmds-check.c Btrfs-progs: update btrfs_file_extent_inline_len to match kernel version 2014-04-11 19:47:29 +02:00
cmds-device.c btrfs-progs: Modify the help string to keep consistent with man page. 2014-04-11 19:05:40 +02:00
cmds-filesystem.c btrfs-progs: Fix the return value of btrfs_scan_kernel() 2014-04-22 14:34:27 +02:00
cmds-inspect.c Btrfs-progs: switch to arg_strtou64() part2 2014-03-21 06:23:19 -07:00
cmds-property.c btrfs-progs: Make property work with -t option 2014-04-11 19:40:18 +02:00
cmds-qgroup.c btrfs-progs: qgroup destroy says create failed 2014-01-31 08:22:12 -08:00
cmds-quota.c
cmds-receive.c btrfs-progs: use usage() to replace the warning msg on no-arg usage 2014-03-21 06:23:15 -07:00
cmds-replace.c Btrfs-progs: switch to arg_strtou64() part3 2014-03-21 06:23:20 -07:00
cmds-rescue.c btrfs-progs: judge the return value of check_mounted more accurately 2014-03-21 06:23:21 -07:00
cmds-restore.c Btrfs-progs: update btrfs_file_extent_inline_len to match kernel version 2014-04-11 19:47:29 +02:00
cmds-scrub.c Btrfs-progs: scrub: disable thread cancelability during mutex locks 2014-04-22 14:33:40 +02:00
cmds-send.c Btrfs-progs: remove unsed pthread attribute objects 2014-04-22 14:33:35 +02:00
cmds-subvolume.c Btrfs-progs: switch to arg_strtou64() part3 2014-03-21 06:23:20 -07:00
commands.h btrfs-progs: move find_mount_root to utils.[ch] 2014-03-21 06:23:12 -07:00
COPYING
crc32c.c
crc32c.h
ctree.c Btrfs-progs: deal with invalid key orderings and bad orphan items V2 2014-01-31 08:22:15 -08:00
ctree.h Btrfs-progs: update btrfs_file_extent_inline_len to match kernel version 2014-04-11 19:47:29 +02:00
dir-item.c
dir-test.c
disk-io.c btrfs-progs: avoid implicit scan for backup SB 2014-04-04 17:54:35 -07:00
disk-io.h btrfs-progs: btrfsck operations should be exclusive 2014-01-31 08:22:26 -08:00
extent_io.c Btrfs-progs: fix the mismatch of extent buffer's space 2014-01-31 08:22:06 -08:00
extent_io.h
extent-cache.c
extent-cache.h
extent-tree.c Btrfs-progs: fsck: handle case that we can not lookup extent info 2014-03-21 06:23:39 -07:00
file-item.c Btrfs-progs: deal with invalid key orderings and bad orphan items V2 2014-01-31 08:22:15 -08:00
free-space-cache.c btrfs-progs: cleanup nonsense ret value assignment 2014-03-21 06:23:16 -07:00
free-space-cache.h
fsck.btrfs btrfs-progs: add fsck.btrfs stub and manpage 2014-01-31 08:22:13 -08:00
hash.h
hasher.c
help.c
inode-item.c
inode-map.c
INSTALL
ioctl-test.c
ioctl.h btrfs-progs: correct prompt of minimal num of devs for raid56 2014-04-11 19:47:30 +02:00
kerncompat.h btrfs-progs: Change BUG() to use assert. 2014-03-21 06:23:11 -07:00
list_sort.c
list_sort.h
list.h
Makefile btrfs-progs: add separate make target to clean docs 2014-04-22 14:15:25 +02:00
math.h btrfs-progs: Copyright string update 2014-03-21 06:23:24 -07:00
mkfs.c btrfs-progs: skip erroneous free before initialization 2014-03-21 09:51:31 -07:00
print-tree.c Btrfs-progs: update btrfs_file_extent_inline_len to match kernel version 2014-04-11 19:47:29 +02:00
print-tree.h
props.c Btrfs-progs: allow compression property gets for read-only subvolumes 2014-05-02 17:03:21 +02:00
props.h Btrfs-progs: introduce btrfs property subgroup 2014-01-31 08:22:31 -08:00
qgroup.c btrfs-progs: make it static if function isn't called outside 2014-01-31 08:22:01 -08:00
qgroup.h Btrfs-progs: enhance btrfs qgroup show to sort qgroups 2013-10-16 08:23:12 -04:00
quick-test.c Btrfs-progs: rework open_ctree to take flags, add a new one V2 2013-11-07 16:10:40 -05:00
radix-tree.c
radix-tree.h
raid6.c
random-test.c
rbtree.c
rbtree.h
repair.c
repair.h
root-tree.c Btrfs-progs: free path if we don't find root item 2014-03-21 06:23:32 -07:00
send-stream.c
send-stream.h
send-test.c Btrfs-progs: remove unsed pthread attribute objects 2014-04-22 14:33:35 +02:00
send-utils.c btrfs-progs: Init root_item to avoid gcc 4.8.2 warning 2014-03-21 06:23:29 -07:00
send-utils.h btrfs-progs: enclose uuid tree compat code with ifdefs 2014-03-21 06:23:07 -07:00
send.h
show-blocks
super-recover.c btrfs-progs: Copyright string update 2014-03-21 06:23:24 -07:00
transaction.h
utils.c Btrfs-progs: allow compression property gets for read-only subvolumes 2014-05-02 17:03:21 +02:00
utils.h Btrfs-progs: allow compression property gets for read-only subvolumes 2014-05-02 17:03:21 +02:00
uuid-tree.c
version.sh v3.14.1 2014-04-18 10:46:31 -07:00
volumes.c btrfs-progs: Fix a memleak in btrfs_scan_one_device. 2014-03-21 09:51:31 -07:00
volumes.h btrfs-progs: don't replicate the stripe_len defines 2014-01-31 08:22:18 -08:00