| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| | |
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Ran the following command:
bpfmt -w $(find . -name Android.bp)
Change-Id: Ia08c8d481199dfa917dbed2dc218df167f101ce5
From AOSP commit: 30fa5b9af82695711cc1bf749fbb0cd18afa008a
|
| |
| |
| |
| |
| |
| |
| | |
Upstream fully supports -Wall now.
Change-Id: Ida895a1c5dfdf168bc6f50049680b2d2bfbb2942
From AOSP commit: 0ef947d1d4890b3fd4509bc1f3c98bb0f0a525f5
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The upstream build system for e2fsprogs doesn't use
-fno-strict-aliasing, so update the Android.bp files to match.
Note: Android's build system currently uses -fno-strict-aliasing by
default anyway, so this change doesn't actually enable strict aliasing.
But that's a bit besides the point. The point is that this project
doesn't need anything special, so we don't need to do anything special.
Change-Id: Ifa637058fd95fdc2b6994a8b801b238e929c1f13
From AOSP commit: c30a15e5d615748d4824dec26f1bda1a86be979c
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
| |
| |
| |
| |
| |
| |
| | |
Sometimes the only way to shut up a compiler warning is to use
a cast. :-(
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
Typos found with codespell.
Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
| |
| |
| |
| |
| |
| | |
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, patch 6e4cc3d5eeb2dfaa055e652b5390beaa6c3d05da introduces
the function of printing the specified number of logs. But there exists
a shortage when n is larger than the total number of logs, it dumped the
duplicated records circulately.
For example, the disk sda only has three records, but using instruction logdump
-On5, it would output the result as follow:
----------------------------------------------------------------------
Journal starts at block 1, transaction 6
Found expected sequence 6, type 1 (descriptor block) at block 1
Found expected sequence 6, type 2 (commit block) at block 4
No magic number at block 5: end of journal.
Found sequence 2 (not 7) at block 7: end of journal.
Found expected sequence 2, type 2 (commit block) at block 7
Found sequence 3 (not 8) at block 8: end of journal.
Found expected sequence 3, type 1 (descriptor block) at block 8
Found sequence 3 (not 8) at block 15: end of journal.
Found expected sequence 3, type 2 (commit block) at block 15
Found sequence 6 (not 9) at block 1: end of journal. <---------begin loop
Found expected sequence 6, type 1 (descriptor block) at block 1
Found sequence 6 (not 9) at block 4: end of journal.
Found expected sequence 6, type 2 (commit block) at block 4
Found sequence 2 (not 10) at block 7: end of journal.
Found expected sequence 2, type 2 (commit block) at block 7
logdump: short read (read 0, expected 1024) while reading journal
In this commit, we solve the problem above by exiting dumping if the
blocknr had already encountered, displayed the total number of logs
that the disk only possessed.
Signed-off-by: lihaoxiang <lihaoxiang9@huawei.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The current version's debugfs possessed the function
logdump. Executing with option -O could output the log history. But
when it occurred the block which had no magic number in it's header,
the program would exit.
Sometimes we were locating problems, needed for more transactions that
had replayed instead of the latest batch of transactions and we
weren't hope to display all the history in the meanwhile. So we
introduced the option -n used for controlling the print of history
transactions. Specially, this parameter was depending on the option
-O otherwise it couldn't work.
So in this modification, we used logdump with -O -n <num_trans>. The
-n options causes logdump to continue past a block with a missing
magic nuber. Instead, it will terminate only when the entire log has
been printed or after <num_trans> transactions.
Link: https://lore.kernel.org/r/608df030-593f-8c69-cb65-632a34729d23@huawei.com
Signed-off-by: lihaoxiang <lihaoxiang9@huawei.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
Blocksize can never be negative, and this makes the use of signed vs
unsigned variables for offsets be consistent.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The function recover_ext3_journal() in debugfs/journal.c, if the log
replay is over, the j_tail_sequence in journal superblock is not
changed to the value of the last transaction sequence. This will
cause subsequent log commitids to count from the commitid in last
time. After tune2fs -e, the log commitid is counted from the commitid
in last time, if the log ID of the current operation overlaps with
that of the last operation, this will cause logs that were previously
replayed by tune2fs to be replayed here.
Signed-off-by: zhanchengbin <zhanchengbin1@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Signed-off-by: liangyun <liangyun2@huawei.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the ncheck argument is of the form "<ino>", allow it for ncheck
for consistency with other commands that accept an inode number.
Improve the error message, use "Invalid inode number" instead
of "Bad inode", which implies the inode content being bad.
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When debugfs runs with "-c", it prints a scary-looking message:
catastrophic mode - not reading inode or group bitmaps
that is often misunderstood by users to mean that there is something
wrong with the filesystem, when there is no problem at all.
Not reading the bitmaps is totally normal and expected behavior for
the "-c" option, which is used to significantly shorten the debugfs
command execution time by not reading metadata that isn't needed for
commands run against very large filesystems.
Since there is often confusion about what this message means, it
would be better to just avoid printing anything at all, since the
use of "-c" is expressly requesting this behavior, and there are
no messages printed out for other options.
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Reviewed-by: Dongyang Li <dongyang@ddn.com>
Change-Id: I59b26a601780544ab995aa4ca7ab0c2123c70118
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|/
|
|
|
|
|
|
| |
Print inode number of orphan file in outputs, dump e2image file to
filesystem image.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
|
|
|
|
|
| |
list_quota and get_quota commands have 'blocks' header while what they
actually show is a used space in bytes. Fix the header to state 'space'
instead.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
| |
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
| |
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
| |
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
|
|
|
| |
To improve consistency, use "file system" in all of the man pages in
preference over "filesystem".
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use target.bionic.system_shared_libs when it is used to limit the
default shared libraries (as opposed to remove them completely).
This avoids attempting to add a host dependency on libc when
system_shared_libs is modified to apply to all variants.
Also remove system_shared_libs from static binaries where it has
no effect, and consolidate it into e2fsprogs-defaults.
Bug: 193559105
Test: m checkbuild
Change-Id: I2d447b006afc783f4acd6c1acd93f338a68a01ed
From AOSP commit: 48fa7248112701c30d3cabfb8d3360b2408d6491
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added SPDX-license-identifier-0BSD SPDX-license-identifier-Apache-2.0
SPDX-license-identifier-BSD SPDX-license-identifier-GPL
SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-LGPL
SPDX-license-identifier-LGPL-2.0 SPDX-license-identifier-LGPL-2.1
SPDX-license-identifier-LGPL-3.0 SPDX-license-identifier-MIT
legacy_notice legacy_unencumbered
to:
Android.bp
Added SPDX-license-identifier-0BSD SPDX-license-identifier-BSD
SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0
SPDX-license-identifier-LGPL SPDX-license-identifier-LGPL-2.1
SPDX-license-identifier-LGPL-3.0 SPDX-license-identifier-MIT
legacy_unencumbered
to:
lib/Android.bp
Added SPDX-license-identifier-0BSD SPDX-license-identifier-BSD
SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-MIT
to:
lib/et/Android.bp
Added SPDX-license-identifier-0BSD SPDX-license-identifier-MIT
to:
lib/ss/Android.bp
Added SPDX-license-identifier-Apache-2.0
to:
contrib/android/Android.bp
Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-GPL
to:
contrib/Android.bp
Added SPDX-license-identifier-BSD
to:
lib/uuid/Android.bp
Added SPDX-license-identifier-GPL
to:
resize/Android.bp
Added SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0
to:
debugfs/Android.bp
Added SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0
SPDX-license-identifier-LGPL
to:
e2fsck/Android.bp
Added SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0
SPDX-license-identifier-LGPL SPDX-license-identifier-LGPL-2.1
SPDX-license-identifier-LGPL-3.0 legacy_unencumbered
to:
lib/ext2fs/Android.bp
Added SPDX-license-identifier-GPL SPDX-license-identifier-LGPL
to:
lib/e2p/Android.bp
Added SPDX-license-identifier-GPL SPDX-license-identifier-LGPL
SPDX-license-identifier-LGPL-2.1 SPDX-license-identifier-LGPL-3.0
to:
lib/blkid/Android.bp
misc/Android.bp
Added SPDX-license-identifier-GPL SPDX-license-identifier-MIT
to:
lib/support/Android.bp
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m all
Exempt-From-Owner-Approval: janitorial work
Change-Id: I239a04a83f12ba051be911d18f6df4ae77fb3368
From AOSP commit: e86522c572b5715b85889cf8ca1c52a5cc350ca7
|
|
|
|
|
|
|
|
|
| |
Fix all warnings about unused function parameters that were introduced
since e2fsprogs v1.45.4, by adding EXT2FS_ATTR((unused)) or removing
parameters as appropriate.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make jbd_debug() do format string checking (but still get compiled away
to nothing) when --enable-jbd-debug isn't specified, similar to
commit d556435156b7 ("jbd2: avoid -Wempty-body warnings") on the kernel
side. This should prevent --enable-jbd-debug from getting broken due to
bad jbd_debug() statements. It also eliminates a -Wunused-variable
warning where a variable was only used in a jbd_debug() statement.
Also remove an alternative definition of jbd_debug() that was
conditional on CONFIG_JBD_DEBUG && !CONFIG_JBD_DEBUG, so was dead code.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
|
|
|
|
|
|
|
| |
Fast commit related struct ext4_fc_tl can be unaligned on disk. So,
while accessing that we should ensure that the pointers are
aligned. This patch fixes unaligned accesses to ext4_fc_tl and also
gets rid of macros fc_for_each_tl and ext4_fc_tag_val that may result
in unaligned accesses to struct ext4_fc_tl.
Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
|
|
| |
https://github.com/tytso/e2fsprogs/issues/63
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
|
|
|
|
|
|
| |
In read_list func, if strtoull() fails in while loop,
we will return the error code directly. Then, memory of
variable lst will be leaked without setting to *list.
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Signed-off-by: linfeilong <linfeilong@huawei.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
| |
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
|
|
| |
Fixes: d96064e9821a ("debugfs: simplify the do_logdump() function")
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
| |
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
|
|
|
| |
This should never happeb, but some checks is useful, and also fixes
some Coverity warnings.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
| |
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
|
| |
Addresses-Coverity-Bug: 1432478
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
|
|
| |
Addresses-Coverity-Bug: 1472879
Addresses-Coverity-Bug: 1472880
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
|
|
|
|
|
| |
Fix double-free issues when parsing an invalid journal_write command,
such as: "journal_write -b 12 -b BAD -b 42".
Addresses-Coverity-Bug: 1464571
Addresses-Coverity-Bug: 1464575
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
|
| |
Fixes: bd9ac48c9200 ("debugfs: add journal header checks in logdump")
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
|
|
| |
Addresses-Coverity-Bug: 1431466
Addresses-Coverity-Bug: 1432478
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
|
|
|
|
|
|
|
|
| |
On most systems where we compile e2fsprogs, the u64 type is an
unsigned long long. However, there are platforms (such as the
PowerPC) where a long 64-bits and so u64 is typedef'ed to be unsigned
long instead of a unsigned long long. Fix this by using explicit
casts in printf statements. For scanf calls, we need to receive the
value into a unsigned long long, and then assign it to a u64, after
doing range checks.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
|
|
|
| |
Fix a couple minor type mismatch warnings.
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
|
| |
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Fixes-Coverity-Bug: 1464575
Fixes-Coverity-Bug: 1464571
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
| |
| |
| |
| |
| |
| |
| | |
Addresses-Coverity-Bug: 1472249
Addresses-Coverity-Bug: 1472253
Addresses-Coverity-Bug: 1472254
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add fast commit support for debugfs logdump.
This commit also adds fast_commit.h that contains the necessary
helpers needed for fast commit replay. Note that this file is also
byte by byte identical with kernel's fast_commit.h.
Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This patch makes recovery.c identical with fast commit kernel changes.
Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|