HomeFreeBSD

Retry zfs_znode_alloc() in zfs_mknode()

Description

Retry zfs_znode_alloc() in zfs_mknode()

For historical reasons zfs_mknode() was written such that it could
never fail. This poses a problem for Linux since zfs_znode_alloc()
could potentually failure due to low memory. Handle this gracefully
by retrying zfs_znode_alloc() until it succeeds, direct reclaim
will eventually be able to allocate memory.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #5535
Closes #5908

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Mar 24 2017, 1:26 AM
GitHub <noreply@github.com>Committed on Mar 24 2017, 1:26 AM
Parents
rGb25c5b0639e0: Fix undefined reference to `libzfs_fru_compare'
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG8d703987407a: Retry zfs_znode_alloc() in zfs_mknode() (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Mar 24 2017, 1:26 AM