+ if (!local_lock && cmd == OBD_BRW_READ) {
+ /*
+ * In OST-side locking case short reads cannot be
+ * detected properly.
+ *
+ * The root of the problem is that
+ *
+ * kms = lov_merge_size(lsm, 1);
+ * if (end >= kms)
+ * glimpse_size(inode);
+ * else
+ * st->st_size = kms;
+ *
+ * logic in the read code (both llite and liblustre)
+ * only works correctly when client holds DLM lock on
+ * [start, end]. Without DLM lock KMS can be
+ * completely out of date, and client can either make
+ * spurious short-read (missing concurrent write), or
+ * return stale data (missing concurrent
+ * truncate). For llite client this is fatal, because
+ * incorrect data are cached and can be later sent
+ * back to the server (vide bug 5047). This is hard to
+ * fix by handling short-reads on the server, as there
+ * is no easy way to communicate file size (or amount
+ * of bytes read/written) back to the client,
+ * _especially_ because OSC pages can be sliced and
+ * dices into multiple RPCs arbitrary. Fortunately,
+ * liblustre doesn't cache data and the worst case is
+ * that we get race with concurrent write or truncate.
+ */
+ }