From cd5bda78aebd9b08050013673efe45e4e7ae7066 Mon Sep 17 00:00:00 2001 From: Fan Yong Date: Tue, 26 May 2015 06:38:35 +0800 Subject: [PATCH] LU-6825 ofd: statfs needs NOT check layout LFSCK status The ofd_statfs() needs NOT to check whether the layout LFSCK is rebuilding the LAST_ID file(s) on the OST or not, because: 1) Such checking will be done when the MDT wants to pre-allocate OST-objects via ofd_create_hdl(). 2) The STATFS request may be from client, if ofd_statfs() returns -ENOSPC to the client under the case of layout LFSCK rebuilding the LAST_ID file(s), the client may be confused. Signed-off-by: Fan Yong Change-Id: Iae9eb8485f3b971fda3bcd299df28db7ad4d80a0 Reviewed-on: http://review.whamcloud.com/15349 Reviewed-by: Nathaniel Clark Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- lustre/ofd/ofd_obd.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lustre/ofd/ofd_obd.c b/lustre/ofd/ofd_obd.c index 2bb97a7..cb7a2e9 100644 --- a/lustre/ofd/ofd_obd.c +++ b/lustre/ofd/ofd_obd.c @@ -688,13 +688,6 @@ int ofd_statfs_internal(const struct lu_env *env, struct ofd_device *ofd, int rc = 0; ENTRY; - down_read(&ofd->ofd_lastid_rwsem); - /* Currently, for safe, we do not distinguish which LAST_ID is broken, - * we may do that in the future. - * Return -ENOSPC until the LAST_ID rebuilt. */ - if (unlikely(ofd->ofd_lastid_rebuilding)) - GOTO(out, rc = -ENOSPC); - spin_lock(&ofd->ofd_osfs_lock); if (cfs_time_before_64(ofd->ofd_osfs_age, max_age) || max_age == 0) { u64 unstable; @@ -767,12 +760,9 @@ int ofd_statfs_internal(const struct lu_env *env, struct ofd_device *ofd, if (from_cache) *from_cache = 1; } - GOTO(out, rc); out: - up_read(&ofd->ofd_lastid_rwsem); - return rc; } -- 1.8.3.1