1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * lustre/lib/fsfilt_smfs.c
5 * Lustre filesystem abstraction routines
7 * Copyright (C) 2004 Cluster File Systems, Inc.
8 * Author: Wang Di <wangdi@clusterfs.com>
10 * This file is part of Lustre, http://www.lustre.org.
12 * Lustre is free software; you can redistribute it and/or
13 * modify it under the terms of version 2 of the GNU General Public
14 * License as published by the Free Software Foundation.
16 * Lustre is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with Lustre; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #define DEBUG_SUBSYSTEM S_FILTER
29 #include <linux/jbd.h>
30 #include <linux/slab.h>
31 #include <linux/pagemap.h>
32 #include <linux/quotaops.h>
33 #include <linux/version.h>
34 #include <linux/kp30.h>
35 #include <linux/lustre_fsfilt.h>
36 #include <linux/lustre_smfs.h>
37 #include <linux/obd.h>
38 #include <linux/obd_class.h>
39 #include <linux/module.h>
40 #include <linux/init.h>
42 static void *fsfilt_smfs_start(struct inode *inode, int op,
43 void *desc_private, int logs)
46 struct inode *cache_inode = I2CI(inode);
47 struct fsfilt_operations *cache_fsfilt = I2FOPS(inode);
49 if (cache_fsfilt == NULL)
52 SMFS_TRANS_OP(inode, op);
54 if (!cache_fsfilt->fs_start)
55 return ERR_PTR(-ENOSYS);
57 handle = cache_fsfilt->fs_start(cache_inode, op, desc_private, logs);
61 static void *fsfilt_smfs_brw_start(int objcount, struct fsfilt_objinfo *fso,
62 int niocount, struct niobuf_local *nb,
63 void *desc_private, int logs)
65 struct fsfilt_operations *cache_fsfilt;
66 struct dentry *cache_dentry = NULL;
67 struct inode *cache_inode = NULL;
68 struct fsfilt_objinfo cache_fso;
72 cache_fsfilt = I2FOPS(fso->fso_dentry->d_inode);
73 if (cache_fsfilt == NULL)
76 cache_inode = I2CI(fso->fso_dentry->d_inode);
77 cache_dentry = pre_smfs_dentry(NULL, cache_inode, fso->fso_dentry);
80 GOTO(exit, rc = ERR_PTR(-ENOMEM));
82 cache_fso.fso_dentry = cache_dentry;
83 cache_fso.fso_bufcnt = fso->fso_bufcnt;
85 if (!cache_fsfilt->fs_brw_start)
86 return ERR_PTR(-ENOSYS);
88 rc = cache_fsfilt->fs_brw_start(objcount, &cache_fso, niocount, nb,
91 post_smfs_dentry(cache_dentry);
95 /* FIXME-WANGDI: here we can easily have inode == NULL due to
96 mds_open() behavior. It passes NULL inode to mds_finish_transno()
97 sometimes. Probably we should have spare way to get cache fsfilt
99 static int fsfilt_smfs_commit(struct super_block *sb, struct inode *inode,
100 void *h, int force_sync)
102 struct fsfilt_operations *cache_fsfilt = S2SMI(sb)->sm_cache_fsfilt;
103 struct super_block *csb = S2CSB(sb);
104 struct inode *cache_inode = NULL;
108 cache_inode = I2CI(inode);
110 if (cache_fsfilt == NULL)
113 if (!cache_fsfilt->fs_commit)
116 rc = cache_fsfilt->fs_commit(csb, cache_inode, h, force_sync);
121 static int fsfilt_smfs_commit_async(struct inode *inode, void *h,
124 struct fsfilt_operations *cache_fsfilt = I2FOPS(inode);
125 struct inode *cache_inode = NULL;
128 cache_inode = I2CI(inode);
129 if (cache_fsfilt == NULL)
132 if (!cache_fsfilt->fs_commit_async)
135 rc = cache_fsfilt->fs_commit_async(cache_inode, h, wait_handle);
140 static int fsfilt_smfs_commit_wait(struct inode *inode, void *h)
142 struct fsfilt_operations *cache_fsfilt = I2FOPS(inode);
143 struct inode *cache_inode = NULL;
146 cache_inode = I2CI(inode);
147 if (cache_fsfilt == NULL)
150 if (!cache_fsfilt->fs_commit_wait)
153 rc = cache_fsfilt->fs_commit_wait(cache_inode, h);
158 static int fsfilt_smfs_setattr(struct dentry *dentry, void *handle,
159 struct iattr *iattr, int do_trunc)
161 struct fsfilt_operations *cache_fsfilt = I2FOPS(dentry->d_inode);
162 struct dentry *cache_dentry = NULL;
163 struct inode *cache_inode = NULL;
169 cache_inode = I2CI(dentry->d_inode);
171 cache_dentry = pre_smfs_dentry(NULL, cache_inode, dentry);
173 GOTO(exit, rc = -ENOMEM);
175 pre_smfs_inode(dentry->d_inode, cache_inode);
177 if (!cache_fsfilt->fs_setattr)
180 rc = cache_fsfilt->fs_setattr(cache_dentry, handle, iattr, do_trunc);
182 post_smfs_inode(dentry->d_inode, cache_inode);
185 struct super_block *sb = dentry->d_inode->i_sb;
187 if (SMFS_DO_REC(S2SMI(sb)) &&
188 SMFS_DO_INODE_REC(dentry->d_inode)) {
189 rc = smfs_rec_setattr(dentry->d_inode, dentry, iattr);
193 post_smfs_dentry(cache_dentry);
197 static int fsfilt_smfs_iocontrol(struct inode *inode, struct file *file,
198 unsigned int cmd, unsigned long arg)
200 struct fsfilt_operations *cache_fsfilt = I2FOPS(inode);
201 struct inode *cache_inode = NULL;
202 struct smfs_file_info *sfi = NULL;
209 cache_inode = I2CI(inode);
217 if (sfi->magic != SMFS_FILE_MAGIC)
223 if (!cache_fsfilt->fs_iocontrol)
227 rc = cache_fsfilt->fs_iocontrol(cache_inode, sfi->c_file, cmd,
230 rc = cache_fsfilt->fs_iocontrol(cache_inode, NULL, cmd, arg);
233 /* FIXME-UMKA: Should this be in duplicate_inode()? */
234 if (rc == 0 && cmd == EXT3_IOC_SETFLAGS)
235 inode->i_flags = cache_inode->i_flags;
237 post_smfs_inode(inode, cache_inode);
242 static int fsfilt_smfs_set_md(struct inode *inode, void *handle,
243 void *lmm, int lmm_size)
245 struct fsfilt_operations *cache_fsfilt = I2FOPS(inode);
246 struct inode *cache_inode = NULL;
252 cache_inode = I2CI(inode);
257 pre_smfs_inode(inode, cache_inode);
259 if (!cache_fsfilt->fs_set_md)
262 down(&cache_inode->i_sem);
263 rc = cache_fsfilt->fs_set_md(cache_inode, handle, lmm, lmm_size);
264 up(&cache_inode->i_sem);
266 post_smfs_inode(inode, cache_inode);
268 smfs_rec_md(inode, lmm, lmm_size);
273 /* Must be called with i_sem held */
274 static int fsfilt_smfs_get_md(struct inode *inode, void *lmm, int lmm_size)
276 struct fsfilt_operations *cache_fsfilt = I2FOPS(inode);
277 struct inode *cache_inode = NULL;
283 cache_inode = I2CI(inode);
288 pre_smfs_inode(inode, cache_inode);
290 if (!cache_fsfilt->fs_get_md)
293 down(&cache_inode->i_sem);
294 rc = cache_fsfilt->fs_get_md(cache_inode, lmm, lmm_size);
295 up(&cache_inode->i_sem);
297 post_smfs_inode(inode, cache_inode);
302 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
303 static int fsfilt_smfs_send_bio(struct inode *inode, struct bio *bio)
305 static int fsfilt_smfs_send_bio(struct inode *inode, struct kiobuf *bio)
308 struct inode *cache_inode;
309 struct fsfilt_operations *cache_fsfilt;
311 cache_fsfilt = I2FOPS(inode);
315 cache_inode = I2CI(inode);
319 if (!cache_fsfilt->fs_send_bio)
322 return cache_fsfilt->fs_send_bio(cache_inode, bio);
326 fsfilt_smfs_getpage(struct inode *inode, long int index)
328 struct fsfilt_operations *cache_fsfilt;
329 struct inode *cache_inode;
331 cache_fsfilt = I2FOPS(inode);
333 RETURN(ERR_PTR(-EINVAL));
335 cache_inode = I2CI(inode);
337 RETURN(ERR_PTR(-EINVAL));
339 if (!cache_fsfilt->fs_getpage)
340 RETURN(ERR_PTR(-ENOSYS));
342 return cache_fsfilt->fs_getpage(cache_inode, index);
345 static ssize_t fsfilt_smfs_readpage(struct file *file, char *buf,
346 size_t count, loff_t *off)
348 struct fsfilt_operations *cache_fsfilt;
349 struct smfs_file_info *sfi;
350 struct inode *cache_inode;
357 cache_fsfilt = I2FOPS(file->f_dentry->d_inode);
361 cache_inode = I2CI(file->f_dentry->d_inode);
366 if (sfi->magic != SMFS_FILE_MAGIC)
369 if (off != &(file->f_pos))
370 cache_ppos = &tmp_ppos;
372 cache_ppos = &sfi->c_file->f_pos;
375 pre_smfs_inode(file->f_dentry->d_inode, cache_inode);
377 if (cache_fsfilt->fs_readpage)
378 rc = cache_fsfilt->fs_readpage(sfi->c_file, buf, count,
382 post_smfs_inode(file->f_dentry->d_inode, cache_inode);
383 duplicate_file(file, sfi->c_file);
389 static int fsfilt_smfs_add_journal_cb(struct obd_device *obd,
390 struct super_block *sb, __u64 last_rcvd,
391 void *handle, fsfilt_cb_t cb_func,
394 struct fsfilt_operations *cache_fsfilt = S2SMI(sb)->sm_cache_fsfilt;
395 struct super_block *csb = S2CSB(sb);
400 if (cache_fsfilt->fs_add_journal_cb)
401 rc = cache_fsfilt->fs_add_journal_cb(obd, csb, last_rcvd,
402 handle, cb_func, cb_data);
406 static int fsfilt_smfs_statfs(struct super_block *sb, struct obd_statfs *osfs)
408 struct fsfilt_operations *cache_fsfilt = S2SMI(sb)->sm_cache_fsfilt;
409 struct super_block *csb = S2CSB(sb);
415 if (!cache_fsfilt->fs_statfs)
418 rc = cache_fsfilt->fs_statfs(csb, osfs);
419 duplicate_sb(csb, sb);
424 static int fsfilt_smfs_sync(struct super_block *sb)
426 struct fsfilt_operations *cache_fsfilt = S2SMI(sb)->sm_cache_fsfilt;
427 struct super_block *csb = S2CSB(sb);
433 if (!cache_fsfilt->fs_sync)
436 rc = cache_fsfilt->fs_sync(csb);
441 int fsfilt_smfs_map_inode_pages(struct inode *inode, struct page **page,
442 int pages, unsigned long *blocks, int *created,
443 int create, struct semaphore *sem)
445 struct fsfilt_operations *cache_fsfilt = I2FOPS(inode);
446 struct inode *cache_inode = NULL;
452 cache_inode = I2CI(inode);
457 if (!cache_fsfilt->fs_map_inode_pages)
460 down(&cache_inode->i_sem);
461 rc = cache_fsfilt->fs_map_inode_pages(cache_inode, page, pages, blocks,
462 created, create, sem);
463 up(&cache_inode->i_sem);
468 static int fsfilt_smfs_prep_san_write(struct inode *inode, long *blocks,
469 int nblocks, loff_t newsize)
471 struct fsfilt_operations *cache_fsfilt = I2FOPS(inode);
472 struct inode *cache_inode = NULL;
478 cache_inode = I2CI(inode);
483 if (!cache_fsfilt->fs_prep_san_write)
486 down(&cache_inode->i_sem);
487 rc = cache_fsfilt->fs_prep_san_write(cache_inode, blocks, nblocks,
489 up(&cache_inode->i_sem);
494 static int fsfilt_smfs_read_record(struct file * file, void *buf,
495 int size, loff_t *offs)
497 struct fsfilt_operations *cache_fsfilt;
498 struct inode *cache_inode;
499 struct smfs_file_info *sfi;
505 cache_fsfilt = I2FOPS(file->f_dentry->d_inode);
509 cache_inode = I2CI(file->f_dentry->d_inode);
515 if (sfi->magic != SMFS_FILE_MAGIC) BUG();
517 if (offs != &(file->f_pos))
518 cache_ppos = &tmp_ppos;
520 cache_ppos = &sfi->c_file->f_pos;
523 pre_smfs_inode(file->f_dentry->d_inode, cache_inode);
525 if (!cache_fsfilt->fs_read_record)
528 rc = cache_fsfilt->fs_read_record(sfi->c_file, buf, size, cache_ppos);
531 post_smfs_inode(file->f_dentry->d_inode, cache_inode);
532 duplicate_file(file, sfi->c_file);
537 static int fsfilt_smfs_write_record(struct file *file, void *buf, int bufsize,
538 loff_t *offs, int force_sync)
540 struct fsfilt_operations *cache_fsfilt;
541 struct inode *cache_inode;
542 struct smfs_file_info *sfi;
549 cache_fsfilt = I2FOPS(file->f_dentry->d_inode);
553 cache_inode = I2CI(file->f_dentry->d_inode);
559 if (sfi->magic != SMFS_FILE_MAGIC)
562 if (offs != &(file->f_pos))
563 cache_ppos = &tmp_ppos;
565 cache_ppos = &sfi->c_file->f_pos;
568 pre_smfs_inode(file->f_dentry->d_inode, cache_inode);
570 if (!cache_fsfilt->fs_write_record)
573 rc = cache_fsfilt->fs_write_record(sfi->c_file, buf,
574 bufsize, cache_ppos, force_sync);
576 post_smfs_inode(file->f_dentry->d_inode, cache_inode);
577 duplicate_file(file, sfi->c_file);
582 static int fsfilt_smfs_post_setup(struct obd_device *obd, struct vfsmount *mnt)
584 struct super_block *sb = NULL;
589 S2SMI(sb)->smsi_exp = obd->obd_self_export;
590 if (SMFS_DO_REC(S2SMI(sb)))
591 rc = smfs_start_rec(sb, mnt);
595 obd->obd_llog_ctxt[LLOG_REINT_ORIG_CTXT] =
596 S2SMI(sb)->smsi_rec_log;
600 CERROR("can not do post setup in obd %p rc=%d", obd, rc);
605 static int fsfilt_smfs_post_cleanup(struct obd_device *obd,
606 struct vfsmount *mnt)
608 struct super_block *sb = NULL;
613 if (SMFS_DO_REC(S2SMI(sb)))
614 rc = smfs_stop_rec(sb);
619 static int fsfilt_smfs_set_kml_flags(struct inode *inode)
622 if (SMFS_DO_REC(S2SMI(inode->i_sb)))
623 SMFS_SET_INODE_REC(inode);
627 static int fsfilt_smfs_clear_kml_flags(struct inode *inode)
630 if (SMFS_DO_REC(S2SMI(inode->i_sb)))
631 SMFS_CLEAN_INODE_REC(inode);
635 static int fsfilt_smfs_set_ost_flags(struct super_block *sb)
638 SET_REC_PACK_TYPE_INDEX(S2SMI(sb)->smsi_flags, PACK_OST);
642 static int fsfilt_smfs_set_mds_flags(struct super_block *sb)
645 SET_REC_PACK_TYPE_INDEX(S2SMI(sb)->smsi_flags, PACK_MDS);
649 static int fsfilt_smfs_get_reint_log_ctxt(struct super_block *sb,
650 struct llog_ctxt **ctxt)
652 struct smfs_super_info *smfs_info = S2SMI(sb);
655 *ctxt = smfs_info->smsi_rec_log;
659 static int fsfilt_smfs_setup(struct obd_device *obd, struct super_block *sb)
661 struct smfs_super_info *smfs_info = S2SMI(sb);
662 struct fsfilt_operations *cache_fsfilt;
663 struct super_block *csb;
666 /* It should be initialized olready by smfs_read_super(). */
667 if (!(cache_fsfilt = smfs_info->sm_cache_fsfilt))
668 cache_fsfilt = fsfilt_get_ops(smfs_info->smsi_cache_ftype);
674 if (cache_fsfilt->fs_setup)
675 rc = cache_fsfilt->fs_setup(obd, csb);
679 static int fsfilt_smfs_set_xattr(struct inode *inode, void *handle, char *name,
680 void *buffer, int buffer_size)
682 struct fsfilt_operations *cache_fsfilt = I2FOPS(inode);
683 struct inode *cache_inode = NULL;
689 cache_inode = I2CI(inode);
693 pre_smfs_inode(inode, cache_inode);
695 if (cache_fsfilt->fs_set_xattr)
696 rc = cache_fsfilt->fs_set_xattr(cache_inode, handle, name,
697 buffer, buffer_size);
698 post_smfs_inode(inode, cache_inode);
703 static int fsfilt_smfs_get_xattr(struct inode *inode, char *name,
704 void *buffer, int buffer_size)
706 struct fsfilt_operations *cache_fsfilt = I2FOPS(inode);
707 struct inode *cache_inode = NULL;
713 cache_inode = I2CI(inode);
717 pre_smfs_inode(inode, cache_inode);
719 if (cache_fsfilt->fs_get_xattr)
720 rc = cache_fsfilt->fs_get_xattr(cache_inode, name,
721 buffer, buffer_size);
722 post_smfs_inode(inode, cache_inode);
727 static int fsfilt_smfs_insert_extents_ea(struct inode *inode,
728 unsigned long from, unsigned long num)
730 struct fsfilt_operations *cache_fsfilt = I2FOPS(inode);
731 struct inode *cache_inode = NULL;
737 cache_inode = I2CI(inode);
741 pre_smfs_inode(inode, cache_inode);
743 if (cache_fsfilt->fs_insert_extents_ea)
744 rc = cache_fsfilt->fs_insert_extents_ea(cache_inode, from, num);
746 post_smfs_inode(inode, cache_inode);
750 static int fsfilt_smfs_remove_extents_ea(struct inode *inode,
751 unsigned long from, unsigned long num)
753 struct fsfilt_operations *cache_fsfilt = I2FOPS(inode);
754 struct inode *cache_inode = NULL;
760 cache_inode = I2CI(inode);
764 pre_smfs_inode(inode, cache_inode);
766 if (cache_fsfilt->fs_remove_extents_ea)
767 rc = cache_fsfilt->fs_remove_extents_ea(cache_inode, from, num);
769 post_smfs_inode(inode, cache_inode);
773 static int fsfilt_smfs_init_extents_ea(struct inode *inode)
775 struct fsfilt_operations *cache_fsfilt = I2FOPS(inode);
776 struct inode *cache_inode = NULL;
782 cache_inode = I2CI(inode);
786 pre_smfs_inode(inode, cache_inode);
788 if (cache_fsfilt->fs_init_extents_ea)
789 rc = cache_fsfilt->fs_init_extents_ea(cache_inode);
791 post_smfs_inode(inode, cache_inode);
795 static int fsfilt_smfs_free_extents(struct super_block *sb, ino_t ino,
796 char *pbuf, int size)
798 OBD_FREE(pbuf, size * (sizeof(struct ldlm_extent)));
802 static int fsfilt_smfs_write_extents(struct dentry *dentry,
803 unsigned long from, unsigned long num)
807 if (SMFS_DO_REC(S2SMI(dentry->d_inode->i_sb)))
808 rc = smfs_write_extents(dentry->d_inode, dentry, from, num);
813 static int fsfilt_smfs_precreate_rec(struct dentry *dentry, int *count,
818 if (SMFS_DO_REC(S2SMI(dentry->d_inode->i_sb)))
819 rc = smfs_rec_precreate(dentry, count, oa);
824 static int fsfilt_smfs_get_ino_write_extents(struct super_block *sb, ino_t ino,
825 char **pbuf, int *size)
827 struct fs_extent *fs_extents;
828 struct ldlm_extent *extents;
830 struct inode *cache_inode;
831 struct fsfilt_operations *cache_fsfilt = NULL;
832 struct lvfs_run_ctxt saved;
833 int rc = 0, fs_ex_size, ex_num, flags;
834 char *buf = NULL, *ex_buf = NULL;
836 push_ctxt(&saved, S2SMI(sb)->smsi_ctxt, NULL);
838 inode = iget(sb, ino);
840 if (!inode || is_bad_inode(inode)) {
841 CWARN("Can not get inode %lu ino\n", ino);
844 cache_inode = I2CI(inode);
845 cache_fsfilt = I2FOPS(inode);
847 rc = cache_fsfilt->fs_get_xattr(cache_inode, REINT_EXTENTS_FLAGS,
848 &flags, sizeof(int));
849 if (!(flags & SMFS_OVER_WRITE) && !(flags & SMFS_DIRTY_WRITE)) {
851 } else if (flags & SMFS_OVER_WRITE) {
853 OBD_ALLOC(ex_buf, sizeof(struct ldlm_extent));
855 GOTO(out, rc=-ENOMEM);
856 extents = (struct ldlm_extent*)(ex_buf);
858 extents->end = 0xffffffff;
862 rc = cache_fsfilt->fs_get_write_extents_num(cache_inode, &fs_ex_size);
865 OBD_ALLOC(buf, fs_ex_size);
867 GOTO(out, rc=-ENOMEM);
869 rc = cache_fsfilt->fs_get_inode_write_extents(cache_inode, &buf,
874 ex_num = fs_ex_size / sizeof(struct fs_extent);
876 OBD_ALLOC(ex_buf, ex_num* sizeof(struct ldlm_extent));
878 GOTO(out, rc=-ENOMEM);
880 fs_extents = (struct fs_extent*)(buf);
881 extents = (struct ldlm_extent*)(ex_buf);
883 int blk_size = I2CI(inode)->i_blksize;
885 extents->start = fs_extents->e_block * blk_size;
886 extents->end = extents->start + fs_extents->e_num * blk_size;
895 OBD_FREE(buf, fs_ex_size);
897 OBD_FREE(ex_buf, (*size) * (sizeof(struct ldlm_extent)));
898 pop_ctxt(&saved, S2SMI(sb)->smsi_ctxt, NULL);
902 static struct fsfilt_operations fsfilt_smfs_ops = {
904 .fs_owner = THIS_MODULE,
905 .fs_start = fsfilt_smfs_start,
906 .fs_brw_start = fsfilt_smfs_brw_start,
907 .fs_commit = fsfilt_smfs_commit,
908 .fs_commit_async = fsfilt_smfs_commit_async,
909 .fs_commit_wait = fsfilt_smfs_commit_wait,
910 .fs_setattr = fsfilt_smfs_setattr,
911 .fs_iocontrol = fsfilt_smfs_iocontrol,
912 .fs_set_md = fsfilt_smfs_set_md,
913 .fs_get_md = fsfilt_smfs_get_md,
914 .fs_readpage = fsfilt_smfs_readpage,
915 .fs_getpage = fsfilt_smfs_getpage,
916 .fs_add_journal_cb = fsfilt_smfs_add_journal_cb,
917 .fs_statfs = fsfilt_smfs_statfs,
918 .fs_sync = fsfilt_smfs_sync,
919 .fs_map_inode_pages = fsfilt_smfs_map_inode_pages,
920 .fs_prep_san_write = fsfilt_smfs_prep_san_write,
921 .fs_write_record = fsfilt_smfs_write_record,
922 .fs_read_record = fsfilt_smfs_read_record,
923 .fs_setup = fsfilt_smfs_setup,
924 .fs_post_setup = fsfilt_smfs_post_setup,
925 .fs_post_cleanup = fsfilt_smfs_post_cleanup,
926 .fs_set_kml_flags = fsfilt_smfs_set_kml_flags,
927 .fs_clear_kml_flags = fsfilt_smfs_clear_kml_flags,
928 .fs_set_ost_flags = fsfilt_smfs_set_ost_flags,
929 .fs_set_mds_flags = fsfilt_smfs_set_mds_flags,
930 .fs_precreate_rec = fsfilt_smfs_precreate_rec,
931 .fs_get_reint_log_ctxt = fsfilt_smfs_get_reint_log_ctxt,
932 .fs_send_bio = fsfilt_smfs_send_bio,
933 .fs_set_xattr = fsfilt_smfs_set_xattr,
934 .fs_get_xattr = fsfilt_smfs_get_xattr,
935 .fs_init_extents_ea = fsfilt_smfs_init_extents_ea,
936 .fs_insert_extents_ea = fsfilt_smfs_insert_extents_ea,
937 .fs_remove_extents_ea = fsfilt_smfs_remove_extents_ea,
938 .fs_get_ino_write_extents = fsfilt_smfs_get_ino_write_extents,
939 .fs_free_write_extents = fsfilt_smfs_free_extents,
940 .fs_write_extents = fsfilt_smfs_write_extents,
941 /* FIXME-UMKA: probably fsfilt_smfs_get_op_len() should be
945 static int __init fsfilt_smfs_init(void)
949 rc = fsfilt_register_ops(&fsfilt_smfs_ops);
953 static void __exit fsfilt_smfs_exit(void)
955 fsfilt_unregister_ops(&fsfilt_smfs_ops);
958 module_init(fsfilt_smfs_init);
959 module_exit(fsfilt_smfs_exit);
961 MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
962 MODULE_DESCRIPTION("Lustre SMFS Filesystem Helper v0.1");
963 MODULE_LICENSE("GPL");