int (* fs_commit)(struct inode *inode, void *handle);
int (* fs_setattr)(struct dentry *dentry, void *handle,
struct iattr *iattr);
- int (* fs_set_md)(struct inode *inode, void *handle,
- struct lov_mds_md *md, int size);
- int (* fs_get_md)(struct inode *inode, struct lov_mds_md *md, int size);
+ int (* fs_set_md)(struct inode *inode, void *handle, void *md,
+ int size);
+ int (* fs_get_md)(struct inode *inode, void *md, int size);
ssize_t (* fs_readpage)(struct file *file, char *buf, size_t count,
loff_t *offset);
int (* fs_journal_data)(struct file *file);
#include <linux/obd.h>
#include <linux/module.h>
-static struct fsfilt_fs_operations fsfilt_extN_fs_ops;
static kmem_cache_t *fcb_cache;
static int fcb_cache_count;
struct fsfilt_cb_data {
struct journal_callback cb_jcb; /* data private to jbd */
- fsfilt_cb_t *cb_func; /* MDS/OBD completion function */
+ fsfilt_cb_t cb_func; /* MDS/OBD completion function */
struct obd_device *cb_obd; /* MDS/OBD completion device */
__u64 cb_last_rcvd; /* MDS/OST last committed operation */
};
}
static int fsfilt_extN_set_md(struct inode *inode, void *handle,
- struct lov_fsfilt_md *lmm, int lmm_size)
+ void *lmm, int lmm_size)
{
int rc;
up(&inode->i_sem);
if (rc) {
- CERROR("error adding objectid "LPX64" to inode %lu: rc = %d\n",
- lmm->lmm_object_id, inode->i_ino, rc);
+ CERROR("error adding MD data to inode %lu: rc = %d\n",
+ inode->i_ino, rc);
if (rc != -ENOSPC) LBUG();
}
return rc;
return (rc == -ENODATA) ? 0 : rc;
}
- /* This field is byteswapped because it appears in the
- * catalogue. All others are opaque to the MDS */
- lmm->lmm_object_id = le64_to_cpu(lmm->lmm_object_id);
-
return rc;
}
fcb->cb_func(fcb->cb_obd, fcb->cb_last_rcvd, error);
- kmem_cache_free(fcb);
+ kmem_cache_free(fcb_cache, fcb);
+ --fcb_cache_count;
}
-static int fsfilt_extN_set_callback(struct obd_device *obd, __u64 last_rcvd,
- void *handle, fsfilt_cb_t *cb_func)
+static int fsfilt_extN_set_last_rcvd(struct obd_device *obd, __u64 last_rcvd,
+ void *handle, fsfilt_cb_t cb_func)
{
#ifdef HAVE_JOURNAL_CALLBACK_STATUS
struct fsfilt_cb_data *fcb;
return 0;
}
-static void fsfilt_extN_free_callback(struct fsfilt_cb_data *fcb)
-{
- kmem_cache_free(fcb_cache, fcb);
- --fcb_cache_count;
-}
-
static int fsfilt_extN_journal_data(struct file *filp)
{
struct inode *inode = filp->f_dentry->d_inode;
return rc;
}
-static struct fsfilt_fs_operations fsfilt_extN_fs_ops = {
+static struct fsfilt_operations fsfilt_extN_fs_ops = {
fs_type: "extN",
fs_owner: THIS_MODULE,
fs_start: fsfilt_extN_start,