Whamcloud - gitweb
LU-2285 osp: Send correct object IDs when deleting orphans
authorLi Wei <wei.g.li@intel.com>
Mon, 12 Nov 2012 09:04:45 +0000 (17:04 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 15 Nov 2012 21:22:50 +0000 (16:22 -0500)
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 <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/4511
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/osp/osp_precreate.c

index 7f85a20..5df08e9 100644 (file)
@@ -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);