]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
staging: lustre: llite: enable clients to inject error for lfsck
authorFan Yong <fan.yong@intel.com>
Tue, 16 Aug 2016 20:18:33 +0000 (16:18 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Aug 2016 13:57:34 +0000 (15:57 +0200)
This enables the client to inject an error by altering
the parent FID in order to test if the server side file
system checker behaves properly.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3951
Reviewed-on: http://review.whamcloud.com/7667
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/obd_support.h
drivers/staging/lustre/lustre/llite/vvp_req.c

index 845e64a56c21b9a7532e9d5158a3f3a37b7913b8..71bf844605e6eea8e466ef3dd1cd52b35f35ecb4 100644 (file)
@@ -474,6 +474,7 @@ extern char obd_jobid_var[];
 #define OBD_FAIL_LFSCK_CRASH           0x160a
 #define OBD_FAIL_LFSCK_NO_AUTO         0x160b
 #define OBD_FAIL_LFSCK_NO_DOUBLESCAN   0x160c
+#define OBD_FAIL_LFSCK_INVALID_PFID    0x1619
 
 /* UPDATE */
 #define OBD_FAIL_UPDATE_OBJ_NET                        0x1700
index 9fe9d6c0a7d1499de1ba063a727b84c7663c0e44..0567a152ab6250f746e9f4422421324038d625e1 100644 (file)
@@ -83,6 +83,8 @@ static void vvp_req_attr_set(const struct lu_env *env,
        }
        obdo_from_inode(oa, inode, valid_flags & flags);
        obdo_set_parent_fid(oa, &ll_i2info(inode)->lli_fid);
+       if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_INVALID_PFID))
+               oa->o_parent_oid++;
        memcpy(attr->cra_jobid, ll_i2info(inode)->lli_jobid,
               JOBSTATS_JOBID_SIZE);
 }