]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: handle failed bio allocation
authorJaegeuk Kim <jaegeuk@kernel.org>
Fri, 14 Aug 2015 18:43:56 +0000 (11:43 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 20 Aug 2015 16:00:09 +0000 (09:00 -0700)
commitc623533a78bc16454fa5454e49b7fe213820a0ee
treea732814d0ebbc706264ec4255ab1a6d006fb5dfe
parent8bafdaffc52cde28b08b10d48471bcc6c0198065
f2fs: handle failed bio allocation

As the below comment of bio_alloc_bioset, f2fs can allocate multiple bios at the
same time. So, we can't guarantee that bio is allocated all the time.

"
 *   When @bs is not NULL, if %__GFP_WAIT is set then bio_alloc will always be
 *   able to allocate a bio. This is due to the mempool guarantees. To make this
 *   work, callers must never allocate more than 1 bio at a time from this pool.
 *   Callers that need to allocate more than 1 bio must always submit the
 *   previously allocated bio for IO before attempting to allocate a new one.
 *   Failure to do so can cause deadlocks under memory pressure.
"

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/segment.c