]> arthur.barton.de Git - bup.git/commit
cmd/midx: add a new --max-files parameter.
authorAvery Pennarun <apenwarr@gmail.com>
Thu, 2 Sep 2010 20:16:39 +0000 (13:16 -0700)
committerAvery Pennarun <apenwarr@gmail.com>
Thu, 2 Sep 2010 20:16:39 +0000 (13:16 -0700)
commit70805a1deacbc31f87bd1f31ab880d2c176c61db
treecbe91697cbf0a2f81b600493a08b72ab5c46ed9d
parent9fbcff9aba8331769d80bf7fd7ba9fe3ecbd7863
cmd/midx: add a new --max-files parameter.

Zoran reported that 'bup midx -f' on his system tried to open 3000 files at
a time and wouldn't work.  That's no good, so let's limit the maximum files
to open; the default is 500 for now, since that ought to be usable for
normal people.  Arguably we could use getrlimit() or something to find out
the actual maximum, or just keep opening stuff until we get an error, but
maybe there's no point.

Unfortunately this patch isn't really perfect, because it limits the
usefulness of midx files.  If you could merge midx files into other midx
files, then you could at least group them all together after multiple runs,
but that's not currently supported.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
cmd/midx-cmd.py