summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* btrfs-progs: Refactor sectorsize users in free-space-cache.cQu Wenruo2017-07-03
| | | | Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Refactor sectorsizes users in file-item.cQu Wenruo2017-07-03
| | | | Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Refactor sectorsize users in mkfs/main.cQu Wenruo2017-07-03
| | | | Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Refactor nodesize users in cmds-inspect-tree-stats.cQu Wenruo2017-07-03
| | | | Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Refactor nodesize users in qgroup-verify.cQu Wenruo2017-07-03
| | | | Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Refactor nodesize user in print-tree.cQu Wenruo2017-07-03
| | | | Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Refactor block sizes users in extent-tree.cQu Wenruo2017-07-03
| | | | | | And in the refactoring, also refactors a open-coded round_up(). Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Refactor nodesize users in utils.cQu Wenruo2017-07-03
| | | | Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Refactor nodesize user in btrfstune.cQu Wenruo2017-07-03
| | | | Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Refactor block sizes users in cmds-check.cQu Wenruo2017-07-03
| | | | Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Refactor nodesize users in image/main.cQu Wenruo2017-07-03
| | | | Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Refactor nodesize user in extent_io.cQu Wenruo2017-07-03
| | | | Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Refactor block sizes users in cmds-restore.cQu Wenruo2017-07-03
| | | | Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Refactor block sizes users in backref.cQu Wenruo2017-07-03
| | | | Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Refactor block sizes users in chunk-recover.cQu Wenruo2017-07-03
| | | | Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Refactor block sizes users in btrfs-map-logical.cQu Wenruo2017-07-03
| | | | Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Refactor block sizes users in ctree.c and ctree.hQu Wenruo2017-07-03
| | | | Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Refactor block sizes users in btrfs-corrupt-block.cQu Wenruo2017-07-03
| | | | | | | | | Convert root->sectorsize/nodesize users in btrfs-corrupt-block. This provides the basis to further refactor incorrect btrfs_root parameter to btrfs_fs_info parameter. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Refactor block sizes users in disk-io.cQu Wenruo2017-07-03
| | | | | | | | | Since we have cached block sizes in fs_info, there is no need to specify these sizes in btrfs_setup_root() function. And refactor all root->sector/node/stripesize users in disk-io.c. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Introduce sectorsize nodesize and stripesize members forQu Wenruo2017-07-03
| | | | | | | | | | | | | btrfs_fs_info Just like what we do in kernel, since we will not support different leaf/node/stripe size per tree, there is no need to store these block sizes in btrfs_root. This patch will introduce these block size members into btrfs_fs_info structure, allowing us to convert such usage in later patches. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Remove deprecated leafsize usageQu Wenruo2017-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | Leafsize is deprecated for a long time, and kernel has already updated ctree.h to rename sb->leafsize to sb->__unused_leafsize. This patch will remove normal users of leafsize: 1) Remove leafsize member from btrfs_root structure Now only root->nodesize and root->sectorisze. No longer root->leafsize. 2) Remove @leafsize parameter from btrfs_setup_root() function Since no root->leafsize, no need for @leafsize parameter. The remaining user of leafsize will be: 1) btrfs inspect-internal dump-super Reformat the "leafsize" output to "leafsize (deprecated)" and use le32_to_cpu() to do the cast manually. 2) mkfs We still need to set sb->__unused_leafsize to nodesize. Do the manual cast too. 3) convert Same as mkfs, these two superblock setup should be merged later Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: Cleanup open-coded btrfs_chunk_item_sizeQu Wenruo2017-07-03
| | | | | | | | In btrfs_check_chunk_valid() we calculate chunk item using open code, use an existing helper btrfs_chunk_item_size() instead. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: docs: document conventionsDavid Sterba2017-07-03
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* Btrfs progs v4.11.1David Sterba2017-06-30
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: update CHANGES for v4.11.1David Sterba2017-06-30
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* Btrfs-progs: convert: do not clear header revLiu Bo2017-06-30
| | | | | | | | | | | So btrfs_set_header_flags() vs btrfs_set_header_flag, the difference is sort of similar to "=" vs "|=", when creating and initialising a new extent buffer, convert uses the former one which clears header_rev by accident. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Reviewed-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* Btrfs-progs: convert: do not clear nodatasum flag in inode itemLiu Bo2017-06-30
| | | | | | | | | With the current btrfs-convert, if we convert a ext4 without data checksum, it'd not set nodatasum flag in inode item, nor create csum item, reading file ends up with checksum errors. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
* Btrfs-progs: man: nodesize must be power of 2 nowLiu Bo2017-06-30
| | | | | | | | This updates mkfs.btrfs's man page with the new limitation that nodesize must be a power of 2 as well. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: lowmem check: Fix false alert about file extent interruptLu Fengqi2017-06-26
| | | | | | | | | | | | | | | | | | | As Qu mentioned in this thread (https://www.spinics.net/lists/linux-btrfs/msg64469.html), compression can cause regular extent to co-exist with an inlined extent. This coexistence makes things confusing. Since it is currently allowed and can appear in a filesystem, fix btrfsck to prevent a bunch of error reports to appear that will make user feel uneasy. When checking a file extent, record the extent_end of the regular extent to check if there is a gap between the regular extents. Normally there is only one inlined extent, so the extent_end of inlined extent is useless. However, if a regular extent can co-exist with an inlined extent, the extent_end of the inlined extent also needs to be recorded. Reported-by: Marc MERLIN <marc@merlins.org> Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: Add test case to check file hole extents with NO_HOLES flagQu Wenruo2017-06-26
| | | | | | | | | | | | Add test case which we have NO_HOLES incompat flag while still have hole file extent. This can be created by enabling NO_HOLES feature on an existing filesystem, which lowmem mode would cause false alert for it. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> [ minor adjustments ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: check: Fix false alert about EXTENT_DATA that shouldn't be a holeQu Wenruo2017-06-26
| | | | | | | | | | | | | | | | Since the incompat feature NO_HOLES still allows us to have an explicit hole file extent, current check is too strict and will cause false alerts like: root 5 EXTENT_DATA[257, 0] shouldn't be hole Fix it by removing the strict file hole extent check. Link: https://www.spinics.net/lists/linux-btrfs/msg66374.html Reported-by: Henk Slager <eye1tm@gmail.com> Tested-by: Henk Slager <eye1tm@gmail.com> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: convert: Add larger device supportLakshmipathi.G2017-06-26
| | | | | | | | | | | | | | | | With larger file system (in this case its 22TB), ext2fs_open() returns EXT2_ET_CANT_USE_LEGACY_BITMAPS error message with ext2fs_read_block_bitmap(). To overcome this issue, (a) we need pass EXT2_FLAG_64BITS flag with ext2fs_open. (b) use 64-bit functions like ext2fs_get_block_bitmap_range2, ext2fs_inode_data_blocks2,ext2fs_read_ext_attr2 (c) use 64bit types with btrfs_convert_context fields Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=194795 Signed-off-by: Lakshmipathi.G <lakshmipathi.g@giis.co.in> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: convert: widen int types in convert contextLakshmipathi.G2017-06-26
| | | | | | | | The u32 types in the convert context might not be enough for some very large filesytems (20TB). Use 64bit types to be safe. Signed-off-by: Lakshmipathi.G <lakshmipathi.g@giis.co.in> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Fix 'btrfs device stats --check' cli optionLakshmipathi.G2017-06-26
| | | | | | | | | | | | "Bug 194961 - btrfs device stats --check <folder> does not work" The long option --check is not recognized as it's missing from the option table. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=194961 Reported-by: Tomas Thiemel<thiemel@centrum.cz> Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: docs: replace <dev> with <device>Kasijjuf2017-06-26
| | | | | | | | As discussed in #50, use 'device' everywhere a path do a device is expected. Pull request: #52 Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: docs: Wrong section in ref to manpageKasijjuf2017-06-26
| | | | | Pull request: #51 Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: sync recent makefile changes to android.mkDavid Sterba2017-06-26
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: docs: Expand confusing abbreviation in documentationKasijjuf2017-06-26
| | | | | | | | While the command interpreter may be able to disambiguate the meaning, the reader is not helped by being forced to do so. Pull request: #48 Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: docs: update note about device deletionDavid Sterba2017-06-26
| | | | | | | | | User Kasijjuf points out the VFS initialism is not explained anywhere. While this could be fixed, the whole note about inability to delete the device by which the filesystem has been mounted, is wrong. Issue: #49 Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: send operates on ro snapshots onlyHans van Kranenburg2017-06-26
| | | | | | | | | | | | | | | While talking to another btrfs user on IRC today, it became clear that a major point of confusion in the btrfs send manual is that it's not telling the user soon enough that send/receive solely operates on subvolume snapshots instead of the original (read/write) subvolumes. So, change the first few lines to explicitly mention snapshots instead. Technically, snapshots are also just subvolumes, but requiring this level of technical detailed knowledge doesn't help the user who is just trying out things. Signed-off-by: Hans van Kranenburg <hans.van.kranenburg@mendix.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: docs: fix sentence for no-dump file attributeDavid Sterba2017-06-26
| | | | | | | User Kasijjuf found a nonsensical sentence in the maunal page. Issue: #45 Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: docs: update formatting of btrfs-propertyDavid Sterba2017-06-26
| | | | | | | | | | | | Reported by a wiki user, that there are formatting artifacts in the 'get' section: in html rendered as "The -t <em><type></em> option can be..." This is probably due to the nesting '' and <>. We don't need the <> in the explanation, as this is only to describe the command line syntax. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: docs: update formatting of btrfs-rescueDavid Sterba2017-06-26
| | | | | | | Reported by a wiki user, that the 'zero-log' section indentaion is wrong. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: test for restoring multiple devices fs into a single deviceFilipe Manana2017-06-26
| | | | | | | | | | | Test that we are able to create an image from a multiple devices fs, that we are able to restore that image into a single device and finally that we are able to mount it. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Liu Bo <bo.li.liu@oracle.com> [ added shell quotation and chmod a+w so testsuite on NFS works ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Fix restoring image from multi devices fs into single deviceFilipe Manana2017-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | We correctly build an image from a multiple devices filesystem but when restoring the image into a single device we were missing updating the number of devices in the superblock to the value 1 (we already took care of setting the number of stripes to 1 for each chunk item and setting the device id for each chunk item to match the device id from the super block). This missing update of the number of devices makes it impossible to mount the restored filesystem on recent kernels, more specifically since the linux kernel commit 99e3ecfcb9f4ca35192d20a5bea158b81f600062 ("Btrfs: add more validation checks for superblock"), that produce the following message in the dmesg/syslog: [21097.542047] BTRFS error (device sdi): super_num_devices 2 mismatch with num_devices 1 found here [21097.543972] BTRFS error (device sdi): failed to read chunk tree: -22 [21097.720360] BTRFS error (device sdi): open_ctree failed So fix this by updating the number of devices to 1 in the superblock. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: remove variable quotation from convert-testsTsutomu Itoh2017-06-26
| | | | | | | | | | | | | | | | | | | | | | In btrfs-progs-v4.11-rc1, the following convert-tests failed. [TEST/conv] 008-readonly-image [TEST/conv] readonly image test, btrfs defaults failed: mke2fs -t ext4 -b 4096 -F /Build/btrfs-progs-v4.11-rc1/tests/test.img test failed for case 008-readonly-image Makefile:271: recipe for target 'test-convert' failed make: *** [test-convert] Error 1 [TEST/conv] 009-common-inode-flags [TEST/conv] common inode flags test, btrfs defaults failed: mke2fs -t ext4 -b 4096 -F /Build/btrfs-progs-v4.11-rc1/tests/test.img test failed for case 009-common-inode-flags Makefile:271: recipe for target 'test-convert' failed make: *** [test-convert] Error 1 So, remove quotes from $default_mke2fs. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* Btrfs progs v4.11David Sterba2017-05-18
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: update CHANGES for v4.11David Sterba2017-05-18
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: fix misc/019-receive-clones-on-munted-subvolDavid Sterba2017-05-15
| | | | | | | | Patches "btrfs-progs: tests: correctly receive clones to mounted subvol" (8eaf63bc9a7b957c566be23df7c6701a9a5b22a2) and followup are missing last unmount which leads to failure of misc/020. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: receiv: fail on first -ENODATA onlyChristian Brauner2017-05-15
| | | | | | | | | | | Returning -ENODATA is only considered invalid on the first run of the loop where we would detect entirely empty stream. The enhanced test misc-tests/018-recv-end-of-stream now passes. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195597 Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> Signed-off-by: David Sterba <dsterba@suse.com>