1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

bcache: reduce MAX_IO to 256

This is the number of concurrent async io requests that
the scan layer will submit to the bcache layer.  There
will be an open fd for each of these, so it is best to
keep this well below the default limit for max open files
(1024), otherwise lvm may get EMFILE from open(2) when
there are around 1024 devices to scan on the system.
This commit is contained in:
David Teigland 2018-08-24 14:46:51 -05:00
parent 3c966e637f
commit fade9ca3b6
2 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 3.0.0 Version 3.0.0
============= =============
Reduce max concurrent aios to avoid EMFILE with many devices.
Fix lvconvert conversion attempts to linear. Fix lvconvert conversion attempts to linear.
Fix lvconvert raid0/raid0_meta -> striped regression. Fix lvconvert raid0/raid0_meta -> striped regression.
Fix lvconvert --splitmirror for mirror type (2.02.178). Fix lvconvert --splitmirror for mirror type (2.02.178).

View File

@ -198,7 +198,15 @@ static bool _async_issue(struct io_engine *ioe, enum dir d, int fd,
return true; return true;
} }
#define MAX_IO 1024 /*
* MAX_IO is returned to the layer above via bcache_max_prefetches() which
* tells the caller how many devices to submit io for concurrently. There will
* be an open file descriptor for each of these, so keep it low enough to avoid
* reaching the default max open file limit (1024) when there are over 1024
* devices being scanned.
*/
#define MAX_IO 256
#define MAX_EVENT 64 #define MAX_EVENT 64
static bool _async_wait(struct io_engine *ioe, io_complete_fn fn) static bool _async_wait(struct io_engine *ioe, io_complete_fn fn)