summaryrefslogtreecommitdiff
path: root/e2fsck/ea_refcount.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix clang warnings on architectures with a 64-bit longTheodore Ts'o2021-02-111-13/+22
| | | | | | | | | | | | 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>
* e2fsck: consistently use ext2fs_get_mem()Andreas Dilger2020-03-041-4/+2
| | | | | | | | | | | | | | | | Consistently use ext2fs_get_mem() and ext2fs_free_mem() instead of calling malloc() and free() directly in e2fsck. In several places it is possible to use ext2fs_get_memzero() instead of explicitly calling memset() on the memory afterward. This is just a code cleanup, and does not fix any specific bugs. [ Fix up library dependencies in e2fsck/Makefile.in to fix "make check" breakages. -- TYT ] Signed-off-by: Andreas Dilger <adilger@whamcloud.com> Lustre-bug-id: https://jira.whamcloud.com/browse/LU-13197 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* e2fsck: generalize ea_refcountTahsin Erdogan2017-07-041-76/+84
| | | | | | | | | Currently ea_refcount is only used to track ea block refcounts. By generalizing it, we could use it for ea quota tracking and also ea_inode refcounts. Signed-off-by: Tahsin Erdogan <tahsin@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* e2fsck: fix printf conversion specs in ea_refcount.cEric Whitney2013-12-241-10/+11
| | | | | | | | | | | | Commit 130e961a6fb9d38997c83c6397cf9ddb5ed2491f changed the type used to represent block numbers in ea_refcount.c from blk_t to blk64_t to add support for 64 bit extended attribute refcounting. We also need to adjust printf conversion specs that now don't match their new blk64_t arguments. This will silence compiler warnings seen when "make check" is run and will avoid truncation of printed values. Signed-off-by: Eric Whitney <enwlinux@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* e2fsck: add support for 64-bit extended attribute block refcountingTheodore Ts'o2013-12-021-9/+9
| | | | | | | | | If we have a 64-bit file system with extended attribute blocks, e2fsck would not correctly handle EA blocks that were located beyond the 32-bit block number boundary. Fix this by teaching e2fsck/ea_refcount.c to use 64-bit block numbers. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* e2fsck: simplify binary search in ea_refcount.cTheodore Ts'o2011-09-301-26/+0
| | | | | | | Remove the interpolation search in ea_refcount. The added complexity isn't worth the speed up. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* misc: quiet minor compiler errorsAndreas Dilger2011-09-241-16/+14
| | | | | | | | | | | Several compiler errors are quieted: - zero-length gnu_printf format string - unused variable - uninitalized variable (though it isn't actually used for anything) - fixed a bug in ext2fs_stat() if stat64() does not exist Signed-off-by: Andreas Dilger <adilger@whamcloud.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Shorten compile commands run by the build systemTheodore Ts'o2011-09-181-0/+1
| | | | | | | | | | | | | | | The DEFS line in MCONFIG had gotten so long that it exceeded 4k, and this was starting to cause some tools heartburn. It also made "make V=1" almost useless, since trying to following the individual commands run by make was lost in the noise of all of the defines. So fix this by putting the configure-generated defines in lib/config.h and the directory pathnames to lib/dirpaths.h. In addition, clean up some vestigal defines in configure.in and in the Makefiles to further shorten the cc command lines. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* e2fsck, resize2fs: fix a fp precision error that can lead to a seg faultTheodore Ts'o2010-07-051-1/+6
| | | | | | | | | | | Commit 641b66b fixed a floating point precision error which can result in a search algorithm looping forever. It can also result in an array index being out of bounds and causing a segfault. Here are two more cases in e2fsck and resize2fs that need to be fixed. I've just used the same fix from the that commit. Signed-off-by: Lachlan McIlroy <lmcilroy@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Fix compiling under diet libcTheodore Ts'o2008-09-121-0/+3
| | | | | | | | Some recent changes had caused diet libc support to bitrot. Fix up missing header files and other portability fixups needed for dietlibc. (Many of these changes also improve general portability.) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Remove trailing whitespace for the entire source treeTheodore Ts'o2008-08-271-10/+10
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Fix gcc -Wall nitpicksTheodore Ts'o2003-12-071-2/+2
|
* ext2fs_getmem(), ext2fs_free_mem(), and ext2fs_resize_mem() Theodore Ts'o2003-08-011-6/+5
| | | | | | all now take a 'void *' instead of a 'void **' in order to avoid pointer aliasing problems with GCC 3.x.
* Fix various gcc -Wall nits. Fixed a bug in mke2fs where a bogusTheodore Ts'o2001-12-161-1/+0
| | | | | | | error message could be printed on an malloc() failure, and e2image was optimized to avoid needless system calls by using the stashed inode functions.
* Add initial support for extended attribute blocksTheodore Ts'o2001-07-021-0/+481