History log of /external/e2fsprogs/lib/ext2fs/tdb.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
dcb8e1fa0452a3d31b678351c2297ad0255d3e4b 07-Mar-2016 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next
d030908bfc424d492c10e6da94ae938e252093ef 02-Jan-2016 Theodore Ts'o <tytso@mit.edu> ext2fs: work around FreeBSD header breakage

FreeBSD 10.2 will blow up compiling its own header files in sys/file.h
if _XOPEN_SOURCE is defined.

In file included from tdb.c:59:
/usr/include/sys/file.h:209:2: error: unknown type name 'u_int'
u_int xf_flag; /* flags (see fcntl.h) */
^
1 error generated.

This is despite the fact that POSIX.1 requires comforming applications
to define _XOPEN_SOURCE (to different numbers depending on the version
of POSIX.1 the program is expecting to work against). See section
2.2.1 in POSIX.1 for chapter and verse.

Work around this by removing the _XOPEN_SOURCE declaration. This will
cause compiler warnings (and will cause builds against some versions
of Solaris to break), so only do this for FreeBSD.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/tdb.c
c866515f023702bbc458cdcfdb904344c72ff6fd 05-May-2015 Darrick J. Wong <darrick.wong@oracle.com> undo-io: add new calls to and speed up the undo io manager

Implement pass-through calls for discard, zero-out, and readahead in
the IO manager so that we can take advantage of any underlying
support.

Furthermore, improve tdb write-out speed by disabling locking and only
fsyncing at the end -- we don't care about locking because having
multiple writers to the undo file will produce an undo database full
of garbage blocks; and we only need to fsync at the end because if we
fail before the end, our undo file will lack the necessary superblock
data that e2undo requires to do replay safely. Without this, we call
fsync four times per tdb update(!) This reduces the overhead of using
undo_io while converting a 2TB FS to metadata_csum from 3+ hours to 55
minutes.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/tdb.c
5f0164b3a4fb0527b3877aff122d564844c0b301 27-Jan-2015 Darrick J. Wong <darrick.wong@oracle.com> libext2fs: fix tdb.c mmap leak

When undoing an expansion of an mmap'd database while cancelling a
transaction, the tdb code prematurely decreases the variable that
tracks the file size, which leads to a region leak during the
subsequent unmap. Fix this by maintaining a separate counter for the
region size.

(This is probably unnecessary since e2undo was the only user of tdb
transactions, but I suppose we could be proactive.)

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/tdb.c
24d364fc43601ea3d2e01cc506633302fa091d8f 10-Jan-2012 Mike Frysinger <vapier@gentoo.org> libext2fs: change getpagesize to sysconf

Newer versions of glibc no longer export the getpagesize() prototype when
using recent versions of POSIX (_XOPEN_SOURCE). So building tdb.c gives
use implicit function declaration warnings. Fix the issue by using the
portable sysconf() function which returns the same answer.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/tdb.c
4e523bbe00cfa0240b4581eeca0c097b05c9fe3e 29-Nov-2011 Theodore Ts'o <tytso@mit.edu> e2fsck: speed up runs when using tdb for large atypical filesystems

Optimize how the tdb library so that running with [scratch_files] in
/etc/e2fsck.conf is more efficient. Use a better hash function,
supplied by Rogier Wolff, and supply an estimate of the size of the
hash table to tdb_open instead of using the default (which is way too
small in most cases). Also, disable the tdb locking and fsync calls,
since it's not necessary for our use in this case (which is
essentially as cheap swap space; the tdb files do not contain
persistent data.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/tdb.c
db40c20e3fd66d90d29a41bef9eb20d1e0745906 28-Nov-2011 Theodore Ts'o <tytso@mit.edu> configure: check for msync() for portability reasons

Turns out the Hurd defines MS_SYNC but doesn't define msync(). Go
figure. So check for both.

Reported by Svante Signell.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/tdb.c
d1b75fd60c255ebc07209a5928dff497f58cd745 05-Nov-2011 Theodore Ts'o <tytso@mit.edu> libext2fs: don't leak tdb_null out of the shared library namespace

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/tdb.c
d1154eb460efe588eaed3d439c1caaca149fa362 18-Sep-2011 Theodore Ts'o <tytso@mit.edu> Shorten compile commands run by the build system

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>
/external/e2fsprogs/lib/ext2fs/tdb.c
efc6f628e15de95bcd13e4f0ee223cb42115d520 28-Aug-2008 Theodore Ts'o <tytso@mit.edu> Remove trailing whitespace for the entire source tree

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/tdb.c
ebabf2ad6d19af5c674b624bafe619dedbc94403 13-Jul-2008 Theodore Ts'o <tytso@mit.edu> Define _XOPEN_SOURCE to 600 consistently for Solaris C99 support

Solaris's header files are very picky about which C compiler can be
used for SUSv3 conformance. Use of C99 is not compatible with SUSv2
(_XOPEN_SOURCE=500), and C89 is not compatible with SUSv3
(_XOPEN_SOURCE=600). Since we need some SUSv3 functions, consistently
use SUSv3 so that e2fsprogs will build on Solaris using c99.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/tdb.c
3eed36b25409dea0cc41c001766456026b5504c8 17-Feb-2008 Theodore Ts'o <tytso@mit.edu> Update to latest samba tdb library before LGPLv3 change

The major changes were:

* Fix realloc() leak on failure case from Jim Meyering
* Fixed various problems in transaction lock code
* Made transaction_brlock() static
* Added more fine-grained locking features

Moved from svn revision #22080 to #23590

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/tdb.c
e7cc6f7d0b86d76963058ef099ca553da29d2c3f 16-Feb-2008 Christophe GRENIER <grenier@cgsecurity.org> Add portability checks to support DJGPP

DJGPP lacks sys/select.h and sys/un.h; add header checks to be more
portable.

Signed-off-by: Christophe Grenier <grenier@cgsecurity.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/tdb.c
106ad96daee151064aa44a857f82ba10c8258b40 05-Apr-2007 Theodore Ts'o <tytso@mit.edu> Add tdb from Samba into libext2fs library.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/tdb.c