- result = end - start <= lsm->lsm_stripe_size &&
- stripe == lov_stripe_number(lsm, start) &&
- stripe == lov_stripe_number(lsm, end);
- if (result) {
+
+ result = 0;
+ /* glimpse should work on the object with LOV EA hole. */
+ if ((end - start <= lsm->lsm_stripe_size) ||
+ (descr->cld_end == CL_PAGE_EOF &&
+ unlikely(lov->lo_lsm->lsm_pattern & LOV_PATTERN_F_HOLE))) {
+ int idx;
+
+ idx = lov_stripe_number(lsm, start);
+ if (idx == stripe ||
+ unlikely(lov_r0(lov)->lo_sub[idx] == NULL)) {
+ idx = lov_stripe_number(lsm, end);
+ if (idx == stripe ||
+ unlikely(lov_r0(lov)->lo_sub[idx] == NULL))
+ result = 1;
+ }
+ }
+
+ if (result != 0) {