@@ -199,6 +199,7 @@ void req_capsule_shrink(struct req_capsule *pill,
extern struct req_format RQF_OST_SET_INFO_LAST_FID;
extern struct req_format RQF_OST_GET_INFO_FIEMAP;
extern struct req_format RQF_OST_LADVISE;
+extern struct req_format RQF_OST_SEEK;
/* LDLM req_format */
extern struct req_format RQF_LDLM_ENQUEUE;
@@ -129,6 +129,7 @@
"client_encryption", /* 0x8000 */
"fidmap", /* 0x10000 */
"getattr_pfid", /* 0x20000 */
+ "lseek", /* 0x40000 */
NULL
};
@@ -777,6 +777,7 @@
&RQF_OST_SET_INFO_LAST_FID,
&RQF_OST_GET_INFO_FIEMAP,
&RQF_OST_LADVISE,
+ &RQF_OST_SEEK,
&RQF_LDLM_ENQUEUE,
&RQF_LDLM_ENQUEUE_LVB,
&RQF_LDLM_CONVERT,
@@ -1611,6 +1612,10 @@ struct req_format RQF_OST_FALLOCATE =
DEFINE_REQ_FMT0("OST_FALLOCATE", ost_body_capa, ost_body_only);
EXPORT_SYMBOL(RQF_OST_FALLOCATE);
+struct req_format RQF_OST_SEEK =
+ DEFINE_REQ_FMT0("OST_SEEK", ost_body_only, ost_body_only);
+EXPORT_SYMBOL(RQF_OST_SEEK);
+
struct req_format RQF_OST_SYNC =
DEFINE_REQ_FMT0("OST_SYNC", ost_body_capa, ost_body_only);
EXPORT_SYMBOL(RQF_OST_SYNC);
@@ -67,7 +67,8 @@
{ OST_QUOTACTL, "ost_quotactl" },
{ OST_QUOTA_ADJUST_QUNIT, "ost_quota_adjust_qunit" },
{ OST_LADVISE, "ost_ladvise" },
- { OST_FALLOCATE, "ost_fallocate"},
+ { OST_FALLOCATE, "ost_fallocate" },
+ { OST_SEEK, "ost_seek" },
{ MDS_GETATTR, "mds_getattr" },
{ MDS_GETATTR_NAME, "mds_getattr_lock" },
{ MDS_CLOSE, "mds_close" },
@@ -108,7 +108,9 @@ void lustre_assert_wire_constants(void)
(long long)OST_LADVISE);
LASSERTF(OST_FALLOCATE == 22, "found %lld\n",
(long long)OST_FALLOCATE);
- LASSERTF(OST_LAST_OPC == 23, "found %lld\n",
+ LASSERTF(OST_SEEK == 23, "found %lld\n",
+ (long long)OST_SEEK);
+ LASSERTF(OST_LAST_OPC == 24, "found %lld\n",
(long long)OST_LAST_OPC);
LASSERTF(OBD_OBJECT_EOF == 0xffffffffffffffffULL, "found 0x%.16llxULL\n",
OBD_OBJECT_EOF);
@@ -1245,6 +1247,8 @@ void lustre_assert_wire_constants(void)
OBD_CONNECT2_FIDMAP);
LASSERTF(OBD_CONNECT2_GETATTR_PFID == 0x20000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT2_GETATTR_PFID);
+ LASSERTF(OBD_CONNECT2_LSEEK == 0x40000ULL, "found 0x%.16llxULL\n",
+ OBD_CONNECT2_LSEEK);
LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
(unsigned int)OBD_CKSUM_CRC32);
LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",
@@ -838,6 +838,7 @@ struct ptlrpc_body_v2 {
#define OBD_CONNECT2_ENCRYPT 0x8000ULL /* client-to-disk encrypt */
#define OBD_CONNECT2_FIDMAP 0x10000ULL /* FID map */
#define OBD_CONNECT2_GETATTR_PFID 0x20000ULL /* pack parent FID in getattr */
+#define OBD_CONNECT2_LSEEK 0x40000ULL /* SEEK_HOLE/DATA RPC */
/* XXX README XXX:
* Please DO NOT add flag values here before first ensuring that this same
* flag value is not in use on some other branch. Please clear any such
@@ -972,6 +973,7 @@ enum ost_cmd {
OST_QUOTA_ADJUST_QUNIT = 20, /* not used since 2.4 */
OST_LADVISE = 21,
OST_FALLOCATE = 22,
+ OST_SEEK = 23,
OST_LAST_OPC /* must be < 33 to avoid MDS_GETATTR */
};
#define OST_FIRST_OPC OST_REPLY