Whamcloud - gitweb
LU-4367 ptlrpc: add OBD_CONNECT_UNLINK_CLOSE flag 26/10426/12
authorLai Siyao <lai.siyao@intel.com>
Fri, 23 May 2014 03:32:09 +0000 (11:32 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 22 Jun 2014 16:24:16 +0000 (16:24 +0000)
Add OBD_CONNECT_UNLINK_CLOSE flag for interop, once this is supported,
client packs file handle in unlink RPC, and MDT will close file before
unlink.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: If2f89a5268b95386e01cdc2f8613fd5c4cbd1d2c
Reviewed-on: http://review.whamcloud.com/10426
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre/lustre_idl.h
lustre/obdclass/lprocfs_status.c
lustre/ptlrpc/wiretest.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c

index d18b8ca..bd9aa6c 100644 (file)
@@ -1349,6 +1349,7 @@ extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
 #define OBD_CONNECT_OPEN_BY_FID        0x20000000000000ULL /* open by fid won't pack
                                                       name in request */
 #define OBD_CONNECT_LFSCK      0x40000000000000ULL/* support online LFSCK */
+#define OBD_CONNECT_UNLINK_CLOSE 0x100000000000000ULL/* close file in unlink */
 
 /* XXX README XXX:
  * Please DO NOT add flag values here before first ensuring that this same
index 25f66b1..e894f33 100644 (file)
@@ -888,6 +888,10 @@ static const char *obd_connect_names[] = {
        "pingless",
        "flock_deadlock",
        "disp_stripe",
+       "open_by_fid",
+       "lfsck",
+       "unknown",
+       "unlink_close",
        "unknown",
        NULL
 };
index 72d0bb0..a3b036a 100644 (file)
@@ -1178,6 +1178,8 @@ void lustre_assert_wire_constants(void)
                 OBD_CONNECT_OPEN_BY_FID);
        LASSERTF(OBD_CONNECT_LFSCK == 0x40000000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT_LFSCK);
+       LASSERTF(OBD_CONNECT_UNLINK_CLOSE == 0x100000000000000ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT_UNLINK_CLOSE);
        LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)OBD_CKSUM_CRC32);
        LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",
index 20d2b04..5e9d2ab 100644 (file)
@@ -525,6 +525,7 @@ check_obd_connect_data(void)
        CHECK_DEFINE_64X(OBD_CONNECT_FLOCK_DEAD);
        CHECK_DEFINE_64X(OBD_CONNECT_OPEN_BY_FID);
        CHECK_DEFINE_64X(OBD_CONNECT_LFSCK);
+       CHECK_DEFINE_64X(OBD_CONNECT_UNLINK_CLOSE);
 
        CHECK_VALUE_X(OBD_CKSUM_CRC32);
        CHECK_VALUE_X(OBD_CKSUM_ADLER);
index 129ad4f..182f7f0 100644 (file)
@@ -1184,6 +1184,8 @@ void lustre_assert_wire_constants(void)
                 OBD_CONNECT_OPEN_BY_FID);
        LASSERTF(OBD_CONNECT_LFSCK == 0x40000000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT_LFSCK);
+       LASSERTF(OBD_CONNECT_UNLINK_CLOSE == 0x100000000000000ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT_UNLINK_CLOSE);
        LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)OBD_CKSUM_CRC32);
        LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",