summaryrefslogtreecommitdiff
path: root/btrfs-zero-log.c
Commit message (Collapse)AuthorAge
* btrfs-progs: unify argc min/max checkingDavid Sterba2016-03-14
| | | | | | We don't want to modify argc. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: unify naming of argc and argvDavid Sterba2016-03-14
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: cleanup and deprecate btrfs-zero-logDavid Sterba2015-06-05
| | | | | | Sync with the 'rescue zero-log' code, add a warning about deprecation. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: autoconf: use standard PACKAGE_* macrosKarel Zak2015-01-28
| | | | | | | | | | | | | - use standard PACKAGE_{NAME,VERSION,STRING,URL,...} autoconf macros rather than homemade BTRFS_BUILD_VERSION - don't #include version.h, now the file is necessary for library API only Note that "btrfs version" returns "btrfs-progs <version>" instead of the original confusing "btrfs <version>". Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: drop feature defines from C files, in favour of CFLAGS definesDimitri John Ledkov2015-01-27
| | | | | | | | | | | | | | | | | | | | | | glibc 2.10+ (5+ years old) enables all the desired features: _XOPEN_SOURCE 700, __XOPEN2K8, POSIX_C_SOURCE, DEFAULT_SOURCE; with a single _GNU_SOURCE define in the makefile alone. For portability to other libc implementations (e.g. dietlibc) _XOPEN_SOURCE=700 is also defined. This also resolves Debian bug report filed by Michael Tautschnig - "Inconsistent use of _XOPEN_SOURCE results in conflicting declarations". Whilst I was not able to reproduce the results, the reported fact is that _XOPEN_SOURCE set to 500 in one set of files (e.g. cmds-filesystem.c) generates/defines different struct stat from other files (cmds-replace.c). This patch thus cleans up all feature defines, and sets them at a consistent level. Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=747969 Signed-off-by: Dimitri John Ledkov <dimitri.j.ledkov@intel.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* Btrfs-progs: add a message to know zero log ran successfullyJosef Bacik2014-11-14
| | | | | | | | | If there are errors when opening the fs because of PARTIAL we could think that the zero-log didn't actually work. Add a printf so we know that it was successfull. Thanks, Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* Btrfs-progs: make zero-log use partial openJosef Bacik2014-11-14
| | | | | | | Because seriously, we only want to kill the tree log. Thanks, Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: use check_argc_* to check arg number for all toolsGui Hecheng2014-08-22
| | | | | | | | | | | | Since this patch: btrfs-progs: move the check_argc_* functions into utils.c All tools including the independent tools(e.g. btrfs-image, btrfs-convert) can share the convenience of the check_argc_* functions, so this patch adopt the argc check functions globally. Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* Btrfs-progs: rework open_ctree to take flags, add a new one V2Josef Bacik2013-11-07
| | | | | | | | | | | So I needed to add a flag to not try to read block groups when doing --init-extent-tree since we could hang there, but that meant adding a whole other 0/1 type flag to open_ctree_fs_info. So instead I've converted it all over to using a flags setting and added the flag that I needed. This has been tested with xfstests and make test. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
* btrfs-progs: fix -Wmissing-noreturnChris West (Faux)2013-10-16
| | | | | | Signed-off-by: "Chris West (Faux)" <git@goeswhere.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
* Btrfs-progs: fix magic return value in btrfs-zero-log.cWang Shilong2013-10-16
| | | | | | Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
* btrfs-progs: separate super_copy out of fs_infoDavid Sterba2013-03-10
| | | | | | | | | Allocate fs_info::super_copy dynamically of full BTRFS_SUPER_INFO_SIZE and use it directly for saving superblock to disk. This fixes incorrect superblock checksum after mkfs. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: make sure btrfs-zero-log writes somethingChris Mason2011-11-21
| | | | | | | The close_ctree code does a check to see if the FS has changed before it does any IO. This forces the commit. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* btrfsck: decode error properlySergei Trofimovich2011-10-25
| | | | | | | | | | | | | | | check_mounted() returns kernel-style negative errors. Patch drops sign for strerror(). Before the patch: check_mounted(): Could not open /dev/sdb2 Could not check mount status: Unknown error 18446744073709551603 After the patch: check_mounted(): Could not open /dev/sdb2 Could not check mount status: Permission denied Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Add rescue command to zero the logChris Mason2010-10-05
Signed-off-by: Chris Mason <chris.mason@oracle.com>