X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Flmv%2Flmv_intent.c;h=1a7fc0a71c64852040909f10267c29d1b42b3a61;hb=41998544b8a34b3c385f2a6adb7ebc01ba496182;hp=14f49d39c5fd6b909a7523ac6c1cbb9b32ebe46d;hpb=809d6a120a238ec64830ab16969728c8433dbeba;p=fs%2Flustre-release.git diff --git a/lustre/lmv/lmv_intent.c b/lustre/lmv/lmv_intent.c index 14f49d3..1a7fc0a 100644 --- a/lustre/lmv/lmv_intent.c +++ b/lustre/lmv/lmv_intent.c @@ -27,7 +27,7 @@ * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2011, 2012, Intel Corporation. + * Copyright (c) 2011, 2013, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -179,7 +179,10 @@ int lmv_intent_open(struct obd_export *exp, struct md_op_data *op_data, if (IS_ERR(tgt)) RETURN(PTR_ERR(tgt)); - if (it->it_op & IT_CREAT) { + /* If it is ready to open the file by FID, do not need + * allocate FID at all, otherwise it will confuse MDT */ + if ((it->it_op & IT_CREAT) && + !(it->it_flags & MDS_OPEN_BY_FID)) { /* * For open with IT_CREATE and for IT_CREATE cases allocate new * fid and setup FLD for it.