From 4f8e8dd74b932b78341b5be36979d020f12ea855 Mon Sep 17 00:00:00 2001 From: Li Wei Date: Mon, 12 Nov 2012 17:04:45 +0800 Subject: [PATCH] LU-2285 osp: Send correct object IDs when deleting orphans When processing an orphan deletion request with object ID n, ofd (as well as obdfilter in older branches) destroys objects from n + 1. This patch fixes osp to send last used IDs instead of last used ID plus ones, so that the first orphan in each sequence will be destroyed correctly. Change-Id: I6aae73dfdd7fa73aca7b1a8cfe074a1902ad981f Signed-off-by: Li Wei Reviewed-on: http://review.whamcloud.com/4511 Tested-by: Hudson Reviewed-by: Alex Zhuravlev Tested-by: Maloo Reviewed-by: Andreas Dilger --- lustre/osp/osp_precreate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lustre/osp/osp_precreate.c b/lustre/osp/osp_precreate.c index 7f85a20..5df08e9 100644 --- a/lustre/osp/osp_precreate.c +++ b/lustre/osp/osp_precreate.c @@ -408,8 +408,7 @@ static int osp_precreate_cleanup_orphans(struct osp_device *d) body->oa.o_valid = OBD_MD_FLFLAGS | OBD_MD_FLGROUP; body->oa.o_seq = FID_SEQ_OST_MDT0; - /* remove from NEXT after used one */ - body->oa.o_id = d->opd_last_used_id + 1; + body->oa.o_id = d->opd_last_used_id; ptlrpc_request_set_replen(req); -- 1.8.3.1