int repoff);
int (*m_set_lock_data)(struct obd_export *exp, __u64 *l, void *data);
- int (*m_put_inode)(struct obd_export *, struct lustre_id *);
+ int (*m_delete_inode)(struct obd_export *, struct lustre_id *);
/* NOTE: If adding ops, add another LPROCFS_OBD_OP_INIT() line to
* lprocfs_alloc_obd_stats() in obdclass/lprocfs_status.c. Also, add a
RETURN(rc);
}
-static inline int md_put_inode(struct obd_export *exp,
- struct lustre_id *id)
+static inline int md_delete_inode(struct obd_export *exp,
+ struct lustre_id *id)
{
int rc;
ENTRY;
- if (MDP(exp->exp_obd, put_inode) == NULL)
+ if (MDP(exp->exp_obd, delete_inode) == NULL)
RETURN(0);
- MD_COUNTER_INCREMENT(exp->exp_obd, put_inode);
- rc = MDP(exp->exp_obd, put_inode)(exp, id);
+ MD_COUNTER_INCREMENT(exp->exp_obd, delete_inode);
+ rc = MDP(exp->exp_obd, delete_inode)(exp, id);
RETURN(rc);
}
int it_disposition(struct lookup_intent *it, int flag);
void it_set_disposition(struct lookup_intent *it, int flag);
void ll_read_inode2(struct inode *inode, void *opaque);
-void ll_put_inode(struct inode *inode);
+void ll_delete_inode(struct inode *inode);
int ll_iocontrol(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg);
void ll_umount_begin(struct super_block *sb);
}
}
-void ll_put_inode(struct inode *inode)
+void ll_delete_inode(struct inode *inode)
{
struct ll_sb_info *sbi = ll_i2sbi(inode);
struct lustre_id id;
int rc;
ENTRY;
- /*
- * notifying metadata target that any in memory data assosiated
- * with object @id should be removed.
- */
- if (atomic_read(&inode->i_count) == 1) {
- ll_inode2id(&id, inode);
+ ll_inode2id(&id, inode);
- rc = md_put_inode(sbi->ll_lmv_exp, &id);
- if (rc) {
- CERROR("md_put_inode() failed, error %d\n",
- rc);
- }
+ rc = md_delete_inode(sbi->ll_lmv_exp, &id);
+ if (rc) {
+ CERROR("md_delete_inode() failed, error %d\n",
+ rc);
}
+ clear_inode(inode);
EXIT;
}
RETURN(err);
}
-static int ll_mknod(struct inode *dir, struct dentry *child, int mode,
- ll_dev_t rdev)
+static int ll_mknod(struct inode *dir, struct dentry *child,
+ int mode, ll_dev_t rdev)
{
struct ptlrpc_request *request = NULL;
struct inode *inode = NULL;
{
.read_inode2 = ll_read_inode2,
.clear_inode = ll_clear_inode,
- .put_inode = ll_put_inode,
+ .delete_inode = ll_delete_inode,
.put_super = lustre_put_super,
.statfs = ll_statfs,
.umount_begin = ll_umount_begin,
RETURN(rc);
}
-/*
- * commented for a while, as it will not work in the case when splitted dir is
- * created from ll_mkdir_stripe(), because mds_reint_create() returns 0 inthis
- * case even if there is created splitted dir with passed number of stripes. So
- * mds_reint_create() and lmv_create() need to be fixed first.
- */
-int lmv_put_inode(struct obd_export *exp, struct lustre_id *id)
+int lmv_delete_inode(struct obd_export *exp, struct lustre_id *id)
{
ENTRY;
-// lmv_delete_obj(exp, id);
+ lmv_delete_obj(exp, id);
RETURN(0);
}
.m_unlink = lmv_unlink,
.m_get_real_obd = lmv_get_real_obd,
.m_valid_attrs = lmv_valid_attrs,
- .m_put_inode = lmv_put_inode,
+ .m_delete_inode = lmv_delete_inode,
};
int __init lmv_init(void)
for (i = 0; i < count && time(0) < end; i++, begin++) {
sprintf(filename, fmt, begin);
if (do_open) {
- int fd = open(filename, O_CREAT|O_RDWR, 0644);
+ int fd = open(filename, O_CREAT | O_RDWR, 0644);
if (fd < 0) {
printf("open(%s) error: %s\n", filename,
strerror(errno));
break;
}
close(fd);
- } else if (do_link) {
+ } else if (do_link) {
rc = link(tgt, filename);
if (rc) {
printf("link(%s, %s) error: %s\n",
break;
}
} else {
- rc = mknod(filename, S_IFREG| 0444, 0);
+ rc = mknod(filename, S_IFREG | 0444, 0);
if (rc) {
printf("mknod(%s) error: %s\n",
filename, strerror(errno));