From 22af4dcd80c3f6fb47080e2d39e6f165f70e7472 Mon Sep 17 00:00:00 2001 From: Nathaniel Clark Date: Fri, 1 Nov 2013 08:52:14 -0400 Subject: [PATCH] LU-3230 osp: unstick precreates on unmount Allow osp_precreate_reserve to propagate error, Add debug code to illuminate what the error code is if not EIO. Test-Parameters: mdsfilesystemtype=zfs mdtfilesystemtype=zfs ostfilesystemtype=zfs Test-Parameters: mdsfilesystemtype=zfs mdtfilesystemtype=zfs ostfilesystemtype=zfs mdscount=3 Signed-off-by: Nathaniel Clark Change-Id: I1c15375d5e50d5a47a72b6c3c8e27512f51c3f9c Reviewed-on: http://review.whamcloud.com/7995 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Alex Zhuravlev Reviewed-by: Johann Lombardi --- lustre/osp/osp_precreate.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lustre/osp/osp_precreate.c b/lustre/osp/osp_precreate.c index 20783fc..4bd43d3 100644 --- a/lustre/osp/osp_precreate.c +++ b/lustre/osp/osp_precreate.c @@ -1010,8 +1010,16 @@ static int osp_precreate_ready_condition(const struct lu_env *env, return 1; /* Bail out I/O fails to OST */ - if (d->opd_pre_status == -EIO) + if (d->opd_pre_status != 0 && + d->opd_pre_status != -EAGAIN && + d->opd_pre_status != -ENODEV && + d->opd_pre_status != -ENOSPC) { + /* DEBUG LU-3230 */ + if (d->opd_pre_status != -EIO) + CERROR("%s: precreate failed opd_pre_status %d\n", + d->opd_obd->obd_name, d->opd_pre_status); return 1; + } return 0; } -- 1.8.3.1