staging: lustre: ptlrpc: add OBD_CONNECT_UNLINK_CLOSE flag
authorLai Siyao <lai.siyao@intel.com>
Tue, 16 Aug 2016 20:19:17 +0000 (16:19 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Aug 2016 13:57:38 +0000 (15:57 +0200)
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>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4367
Reviewed-on: http://review.whamcloud.com/10426
Reviewed-by: Andreas Dilger <andreas.dilger@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>
drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
drivers/staging/lustre/lustre/ptlrpc/wiretest.c

index a9661c0c6aa1a8c8aead05537ffef64054e7cb84..4a7ccc8e33c3680bce2b78d3e2d84aca63b170b0 100644 (file)
@@ -1290,6 +1290,7 @@ void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
                                                         * 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 fbb08517d57a02c36b74c043a051399fcd32a893..45e3c4a9f6f6ebfa419ac3aa2331b995bfc89857 100644 (file)
@@ -99,6 +99,8 @@ static const char * const obd_connect_names[] = {
        "open_by_fid",
        "lfsck",
        "unknown",
+       "unlink_close",
+       "unknown",
        NULL
 };
 
index 60d03dd0d58c3a1d031c74b4a6a3bd8023fadf28..2c718e0d0ea054bd37ef7201f1ac3ca391b94a24 100644 (file)
@@ -1073,6 +1073,8 @@ void lustre_assert_wire_constants(void)
                 "found 0x%.16llxULL\n", 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",