int objcount, struct obd_ioobj *obj,
int niocount, struct niobuf_remote *nb,
struct niobuf_local *res,
- struct obd_trans_info *oti)
+ struct obd_trans_info *oti,
+ struct lustre_capa *capa)
{
struct obd_device *obd = exp->exp_obd;
struct lvfs_run_ctxt saved;
inode = dentry->d_inode;
+ if (inode) {
+ rc = filter_verify_fid(exp, inode, capa);
+ if (rc)
+ GOTO(cleanup, rc);
+ }
+
fsfilt_check_slow(now, obd_timeout, "preprw_read setup");
for (i = 0, lnb = res, rnb = nb; i < obj->ioo_bufcnt;
for (i = 0; i < fso[obj].fso_bufcnt; i++, n++) {
int tmp, bytes;
- /* FIXME: this is calculated with PAGE_SIZE on client */
+ /* XXX: this is calculated with PAGE_SIZE on client */
bytes = rnb[n].len;
bytes += rnb[n].offset & (blocksize - 1);
tmp = (rnb[n].offset + rnb[n].len) & (blocksize - 1);
}
exp->exp_obd->u.filter.fo_tot_dirty -= used;
fed->fed_dirty -= used;
-
return rc;
}
int objcount, struct obd_ioobj *obj,
int niocount, struct niobuf_remote *nb,
struct niobuf_local *res,
- struct obd_trans_info *oti)
+ struct obd_trans_info *oti,
+ struct lustre_capa *capa)
{
int rc = 0, i, tot_bytes = 0, cleanup_phase = 0;
struct obd_device *obd = exp->exp_obd;
struct niobuf_remote *rnb;
struct fsfilt_objinfo fso;
obd_size left;
- obd_uid uid;
- obd_gid gid;
void *iobuf;
ENTRY;
obd = exp->exp_obd;
push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
- uid = oa->o_valid & OBD_MD_FLUID ? oa->o_uid : 0;
- gid = oa->o_valid & OBD_MD_FLGID ? oa->o_gid : 0;
-
/* make sure that object is already allocated */
dentry = filter_crow_object(obd, oa);
if (IS_ERR(dentry))
GOTO(cleanup, rc = PTR_ERR(dentry));
+ rc = filter_verify_fid(exp, dentry->d_inode, capa);
+ if (rc)
+ GOTO(cleanup, rc);
+
cleanup_phase = 2;
fso.fso_dentry = dentry;
if (cmd == OBD_BRW_WRITE)
return filter_preprw_write(cmd, exp, oa, objcount, obj,
- niocount, nb, res, oti);
+ niocount, nb, res, oti, capa);
if (cmd == OBD_BRW_READ)
return filter_preprw_read(cmd, exp, oa, objcount, obj,
- niocount, nb, res, oti);
+ niocount, nb, res, oti, capa);
LBUG();
return -EPROTO;