Whamcloud - gitweb
LU-11536 ofd: ofd_create_hdl may return 0 in case of ENOSPC 78/33978/2
authorSergey Cheremencev <c17829@cray.com>
Mon, 25 Jun 2018 15:52:11 +0000 (18:52 +0300)
committerOleg Drokin <green@whamcloud.com>
Wed, 16 Jan 2019 07:31:08 +0000 (07:31 +0000)
commit496ddb5b99394142bc158b3f8b0149bcb6b6eae0
tree58a08535fb0dcb7fe05d789638ae8502850cbfed
parentde87598eaf5eea309faa845209148b787ed29c10
LU-11536 ofd: ofd_create_hdl may return 0 in case of ENOSPC

ostid_set_id rewrites ofd_precreate_objects result after
"LU-6401 uapi: fix up lustre_ostid.h and lustre_fid.h".
This breakes the logic of osp_precreate_reserve() causing
osp_precreate_send() to return ESTALE instead of ENOSPC
when OST can't precreate objects.
osp_precreate_send() returns ESTALE because the result of
create is 0 while last created fid on OST is still the same
with local last_id:

fs1-OST0001-osc-MDT0000: precreate fid [0x100010000:0x571607f:0x0] <
local used fid [0x100010000:0x571607f:0x0]: rc = -116
fs1-OST0001-osc-MDT0000: precreate failed opd_pre_status -116
fs1-OST0001-osc-MDT0000: cannot precreate objects: rc = -116

Lustre-change: https://review.whamcloud.com/33390
Lustre-commit: 1f97bb8e7236971aaf3029fe3699db9baf721da1

Change-Id: I4dc057c201253cab14e63c1f06bd5b0d56b5ad2d
Signed-off-by: Sergey Cheremencev <c17829@cray.com>
Fixes: 34acfbc2bfe502d18c12ba35771bde7c4a0f7906
Reviewed-on: https://es-gerrit.dev.cray.com/153462
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Artem Blagodarenko <c17828@cray.com>
Tested-by: Alexander Lezhoev <c17454@cray.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/33978
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
lustre/ofd/ofd_dev.c
lustre/osp/osp_precreate.c