summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre
diff options
context:
space:
mode:
authorArtem Blagodarenko <artem_blagodarenko@xyratex.com>2016-09-18 16:38:45 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-19 10:03:41 +0200
commit0022c6bcb4927c0ad94f9035fd38c123c48e0457 (patch)
treea72ec99cf1e4c2e41c7c334568aec87114d48ffb /drivers/staging/lustre
parent7ebb0ef382814c6c23188d7cf13951357fa75302 (diff)
downloadlinux-0022c6bcb4927c0ad94f9035fd38c123c48e0457.tar.gz
linux-0022c6bcb4927c0ad94f9035fd38c123c48e0457.tar.bz2
linux-0022c6bcb4927c0ad94f9035fd38c123c48e0457.zip
staging: lustre: client: Fix mkdir -i 1 from DNE2 client to DNE1 server
After DNE phase 2 has been added to client it sends create request to slave MDT. DNT1-only server doesn't expect request to slave MDT from client. It expects only cross-mdt request from master MDT. Thus if DNE2 client tries to "mkdir -i 1" on DNE1 server, then LBUG happened. This patch adds OBD_CONNECT_DIR_STRIPE connection flag check on client side. If striped directories are not supported by server, then create requrest is sent to master MDT. Signed-off-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6071 Xyratex-bug-id: MRP-2319 Reviewed-on: http://review.whamcloud.com/13189 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: wang di <di.wang@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r--drivers/staging/lustre/lustre/lmv/lmv_obd.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c
index 0337f0532e8c..9461cd3d18e5 100644
--- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c
+++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c
@@ -1688,15 +1688,19 @@ static int lmv_create(struct obd_export *exp, struct md_op_data *op_data,
if (rc)
return rc;
- /*
- * Send the create request to the MDT where the object
- * will be located
- */
- tgt = lmv_find_target(lmv, &op_data->op_fid2);
- if (IS_ERR(tgt))
- return PTR_ERR(tgt);
+ if (exp_connect_flags(exp) & OBD_CONNECT_DIR_STRIPE) {
+ /*
+ * Send the create request to the MDT where the object
+ * will be located
+ */
+ tgt = lmv_find_target(lmv, &op_data->op_fid2);
+ if (IS_ERR(tgt))
+ return PTR_ERR(tgt);
- op_data->op_mds = tgt->ltd_idx;
+ op_data->op_mds = tgt->ltd_idx;
+ } else {
+ CDEBUG(D_CONFIG, "Server doesn't support striped dirs\n");
+ }
CDEBUG(D_INODE, "CREATE obj "DFID" -> mds #%x\n",
PFID(&op_data->op_fid1), op_data->op_mds);