GOTO(out, rc);
file->f_flags &= ~O_LOV_DELAY_CREATE;
- obdo_refresh_inode(inode, oa, OBD_MD_FLBLOCKS | OBD_MD_FLBLKSZ |
- OBD_MD_FLATIME | OBD_MD_FLMTIME |
- OBD_MD_FLCTIME);
+ obdo_refresh_inode(inode, oa, (OBD_MD_FLBLOCKS | OBD_MD_FLATIME |
+ OBD_MD_FLMTIME | OBD_MD_FLCTIME));
EXIT;
out:
obdo_free(oa);
}
GOTO(out_oa, rc);
}
- obdo_refresh_inode(inode, oa, OBD_MD_FLBLKSZ);
LASSERT(lsm && lsm->lsm_object_id);
rc = obd_packmd(conn, &lmm, lsm);
(aft != 0 || after < before) &&
oa.o_size < ((u64)before + 1) << PAGE_CACHE_SHIFT);
- obdo_refresh_inode(inode, &oa, OBD_MD_FLBLOCKS | OBD_MD_FLBLKSZ |
- OBD_MD_FLMTIME | OBD_MD_FLCTIME);
+ obdo_refresh_inode(inode, &oa, (OBD_MD_FLBLOCKS | OBD_MD_FLMTIME |
+ OBD_MD_FLCTIME));
if (inode->i_blksize < PAGE_CACHE_SIZE)
inode->i_blksize = PAGE_CACHE_SIZE;
max_pages = ((end_index - first_page->index) << PAGE_CACHE_SHIFT) >>
PAGE_SHIFT;
- pgs = kmalloc(max_pages * sizeof(*pgs), GFP_USER);
+ OBD_ALLOC_GFP(pgs, max_pages * sizeof(*pgs), GFP_USER);
if (pgs == NULL)
RETURN(-ENOMEM);
} else if (extent_end < end_index)
end_index = extent_end;
+ CDEBUG(D_INFO, "max_pages: %d, extent_end: %lu, end_index: %lu, "
+ "i_size: "LPU64"\n",
+ max_pages, extent_end, end_index, inode->i_size);
+
/* to balance the find_get_page ref the other pages get that is
* decrefed on teardown.. */
page_cache_get(page);
page_cache_release(page);
}
- kfree(pgs);
+ OBD_FREE(pgs, max_pages * sizeof(*pgs));
RETURN(rc);
} /* ll_readpage */
LTIME_S(dst->i_ctime) = src->o_ctime;
if (valid & OBD_MD_FLSIZE && src->o_size > dst->i_size)
dst->i_size = src->o_size;
- /* optimum IO size */
- if (valid & OBD_MD_FLBLKSZ)
- dst->i_blksize = src->o_blksize;
+ /* Bug 1598: don't ever update i_blksize here; it needs to be managed
+ * by the LOV */
/* allocation of space */
if (valid & OBD_MD_FLBLOCKS && src->o_blocks > dst->i_blocks)
dst->i_blocks = src->o_blocks;
LASSERT(oti != NULL);
oti->oti_handle = fsfilt_brw_start(exp->exp_obd, objcount, fso,
- niocount, oti);
+ niocount, oti->oti_handle);
if (IS_ERR(oti->oti_handle)) {
rc = PTR_ERR(oti->oti_handle);
CDEBUG(rc == -ENOSPC ? D_INODE : D_ERROR,