Whamcloud - gitweb
1)do precreate record in obdfilter
[fs/lustre-release.git] / lustre / include / linux / lustre_fsfilt.h
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  *  Copyright (C) 2001-2004 Cluster File Systems, Inc. <info@clusterfs.com>
5  *
6  *   This file is part of Lustre, http://www.lustre.org.
7  *
8  *   Lustre is free software; you can redistribute it and/or
9  *   modify it under the terms of version 2 of the GNU General Public
10  *   License as published by the Free Software Foundation.
11  *
12  *   Lustre is distributed in the hope that it will be useful,
13  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *   GNU General Public License for more details.
16  *
17  *   You should have received a copy of the GNU General Public License
18  *   along with Lustre; if not, write to the Free Software
19  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20  *
21  * Filesystem interface helper.
22  *
23  */
24
25 #ifndef _LUSTRE_FSFILT_H
26 #define _LUSTRE_FSFILT_H
27
28 #ifdef __KERNEL__
29
30 #include <linux/obd.h>
31 #include <linux/lustre_log.h>
32 #include <linux/obd_class.h>
33
34 typedef void (*fsfilt_cb_t)(struct obd_device *obd, __u64 last_rcvd,
35                             void *data, int error);
36
37 struct fsfilt_objinfo {
38         struct dentry *fso_dentry;
39         int fso_bufcnt;
40 };
41
42 struct fsfilt_operations {
43         struct list_head fs_list;
44         struct module *fs_owner;
45         char   *fs_type;
46         void   *(* fs_start)(struct inode *inode, int op, void *desc_private,
47                              int logs);
48         void   *(* fs_brw_start)(int objcount, struct fsfilt_objinfo *fso,
49                                  int niocount, struct niobuf_local *nb,
50                                  void *desc_private, int logs);
51         int     (* fs_commit)(struct super_block *sb, struct inode *inode, 
52                               void *handle,int force_sync);
53         int     (* fs_commit_async)(struct inode *inode, void *handle,
54                                         void **wait_handle);
55         int     (* fs_commit_wait)(struct inode *inode, void *handle);
56         int     (* fs_setattr)(struct dentry *dentry, void *handle,
57                                struct iattr *iattr, int do_trunc);
58         int     (* fs_iocontrol)(struct inode *inode, struct file *file,
59                                  unsigned int cmd, unsigned long arg);
60         int     (* fs_set_md)(struct inode *inode, void *handle, void *md,
61                               int size);
62         int     (* fs_get_md)(struct inode *inode, void *md, int size);
63
64         /* this method is needed to make IO operation fsfilt nature depend. */
65 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
66         int     (* fs_send_bio)(struct inode *inode, struct bio *bio);
67 #else
68         int     (* fs_send_bio)(struct inode *inode, struct kiobuf *bio);
69 #endif
70
71         /* methods for getting page from backing fs and putting page there
72          * during IO. Used on OST. */
73         int (* fs_putpage)(struct inode *inode, struct page *page);
74         struct page *(* fs_getpage)(struct inode *inode, long int index);
75
76         ssize_t (* fs_readpage)(struct file *file, char *buf, size_t count,
77                                 loff_t *offset);
78         int     (* fs_add_journal_cb)(struct obd_device *obd, struct super_block *sb,
79                                       __u64 last_rcvd, void *handle, fsfilt_cb_t cb_func,
80                                       void *cb_data);
81         int     (* fs_statfs)(struct super_block *sb, struct obd_statfs *osfs);
82         int     (* fs_sync)(struct super_block *sb);
83         int     (* fs_map_inode_pages)(struct inode *inode, struct page **page,
84                                        int pages, unsigned long *blocks,
85                                        int *created, int create,
86                                        struct semaphore *sem);
87         int     (* fs_prep_san_write)(struct inode *inode, long *blocks,
88                                       int nblocks, loff_t newsize);
89         int     (* fs_write_record)(struct file *, void *, int size, loff_t *,
90                                     int force_sync);
91         int     (* fs_read_record)(struct file *, void *, int size, loff_t *);
92         int     (* fs_setup)(struct obd_device *, struct super_block *);
93         
94         int     (* fs_post_setup)(struct obd_device *obd, struct vfsmount *mnt);
95         int     (* fs_post_cleanup)(struct obd_device *obd, struct vfsmount *mnt);
96         int     (* fs_get_reint_log_ctxt)(struct super_block *sb, 
97                                           struct llog_ctxt **ctxt);
98         int     (* fs_set_kml_flags)(struct inode *inode);
99         int     (* fs_clear_kml_flags)(struct inode *inode);
100         int     (* fs_set_ost_flags)(struct super_block *sb);
101         int     (* fs_set_mds_flags)(struct super_block *sb);
102         int     (* fs_precreate_rec)(struct dentry *dentry, int *num, 
103                                      struct obdo *oa);
104         int     (* fs_set_xattr)(struct inode *inode, void *handle, char *name,
105                                  void *buffer, int buffer_size);
106         int     (* fs_get_xattr)(struct inode *inode, char *name,
107                                  void *buffer, int buffer_size); 
108         
109         int     (* fs_init_extents_ea)(struct inode *inode); 
110         int     (* fs_insert_extents_ea)(struct inode *inode, unsigned long from, 
111                                          unsigned long num); 
112         int     (* fs_write_extents)(struct dentry *dentry, 
113                                      unsigned long offset, unsigned long blks);
114         int     (* fs_remove_extents_ea)(struct inode *inode, unsigned long from, 
115                                          unsigned long num); 
116         int     (* fs_get_ino_write_extents)(struct super_block *sb, ino_t ino, 
117                                              char **pbuf, int *size);
118         int     (* fs_free_write_extents)(struct super_block *sb, ino_t ino, 
119                                           char *pbuf, int size);
120         int     (* fs_get_inode_write_extents)(struct inode *inode, char **pbuf, 
121                                                int *size);
122         int     (* fs_get_write_extents_num)(struct inode *inode, int* size);
123
124         int     (* fs_get_op_len)(int, struct fsfilt_objinfo *, int);
125         int     (* fs_add_dir_entry)(struct obd_device *, struct dentry *,
126                                      char *, int, unsigned long, unsigned long,
127                                      unsigned);
128         int     (* fs_del_dir_entry)(struct obd_device *, struct dentry *);
129 };
130
131 extern int fsfilt_register_ops(struct fsfilt_operations *fs_ops);
132 extern void fsfilt_unregister_ops(struct fsfilt_operations *fs_ops);
133 extern struct fsfilt_operations *fsfilt_get_ops(const char *type);
134 extern void fsfilt_put_ops(struct fsfilt_operations *fs_ops);
135
136 #define FSFILT_OP_UNLINK         1
137 #define FSFILT_OP_RMDIR          2
138 #define FSFILT_OP_RENAME         3
139 #define FSFILT_OP_CREATE         4
140 #define FSFILT_OP_MKDIR          5
141 #define FSFILT_OP_SYMLINK        6
142 #define FSFILT_OP_MKNOD          7
143 #define FSFILT_OP_SETATTR        8
144 #define FSFILT_OP_LINK           9
145 #define FSFILT_OP_CANCEL_UNLINK 10
146 #define FSFILT_OP_NOOP          15
147
148 /* XXX BUG 3188 -- must return to one set of opcodes */
149 #define KML_UNLINK              0x11
150 #define KML_RMDIR               0x12
151 #define KML_RENAME              0x13
152 #define KML_CREATE              0x14
153 #define KML_MKDIR               0x15
154 #define KML_SYMLINK             0x16
155 #define KML_MKNOD               0x17
156 #define KML_LINK                0x19
157
158 #define CACHE_UNLINK            0x21
159 #define CACHE_RMDIR             0x22
160 #define CACHE_RENAME            0x23
161 #define CACHE_CREATE            0x24
162 #define CACHE_MKDIR             0x25
163 #define CACHE_SYMLINK           0x26
164 #define CACHE_MKNOD             0x27
165 #define CACHE_LINK              0x29
166 #define CACHE_NOOP              0x2f
167
168 #define KML_CACHE_UNLINK        0x31
169 #define KML_CACHE_RMDIR         0x32
170 #define KML_CACHE_RENAME        0x33
171 #define KML_CACHE_CREATE        0x34
172 #define KML_CACHE_MKDIR         0x35
173 #define KML_CACHE_SYMLINK       0x36
174 #define KML_CACHE_MKNOD         0x37
175 #define KML_CACHE_LINK          0x39
176 #define KML_CACHE_NOOP          0x3f
177
178 static inline void *
179 fsfilt_start_ops(struct fsfilt_operations *ops, struct inode *inode,
180                  int op, struct obd_trans_info *oti, int logs)
181 {
182         unsigned long now = jiffies;
183         void *parent_handle = oti ? oti->oti_handle : NULL;
184         void *handle = ops->fs_start(inode, op, parent_handle, logs);
185         CDEBUG(D_HA, "started handle %p (%p)\n", handle, parent_handle);
186
187         if (oti != NULL) {
188                 if (parent_handle == NULL) {
189                         oti->oti_handle = handle;
190                 } else if (handle != parent_handle) {
191                         CERROR("mismatch: parent %p, handle %p, oti %p\n",
192                                parent_handle, handle, oti);
193                         LBUG();
194                 }
195         }
196         if (time_after(jiffies, now + 15 * HZ))
197                 CERROR("long journal start time %lus\n", (jiffies - now) / HZ);
198         return handle;
199 }
200
201 static inline void *
202 fsfilt_start_log(struct obd_device *obd, struct inode *inode,
203                  int op, struct obd_trans_info *oti, int logs)
204 {
205         return fsfilt_start_ops(obd->obd_fsops, inode, op, oti, logs);
206 }
207
208 static inline void *
209 fsfilt_start(struct obd_device *obd, struct inode *inode,
210              int op, struct obd_trans_info *oti)
211 {
212         return fsfilt_start_ops(obd->obd_fsops, inode, op, oti, 0);
213 }
214
215 static inline void *
216 llog_fsfilt_start(struct llog_ctxt *ctxt, struct inode *inode,
217                   int op, struct obd_trans_info *oti)
218 {
219         return fsfilt_start_ops(ctxt->loc_fsops, inode, op, oti, 1);
220 }
221
222 static inline int
223 fsfilt_commit_ops(struct fsfilt_operations *ops, struct super_block *sb,
224                   struct inode *inode, void *handle, int force_sync)
225 {
226         unsigned long now = jiffies;
227         int rc = ops->fs_commit(sb, inode, handle, force_sync);
228         CDEBUG(D_HA, "committing handle %p\n", handle);
229
230         if (time_after(jiffies, now + 15 * HZ))
231                 CERROR("long journal start time %lus\n", (jiffies - now) / HZ);
232
233         return rc;
234 }
235
236 static inline int
237 fsfilt_commit(struct obd_device *obd, struct super_block *sb, 
238               struct inode *inode, void *handle, int force_sync)
239 {
240         return fsfilt_commit_ops(obd->obd_fsops, sb, inode, handle, force_sync);
241 }
242
243 static inline int
244 llog_fsfilt_commit(struct llog_ctxt *ctxt, struct inode *inode,
245                    void *handle, int force_sync)
246 {
247         return fsfilt_commit_ops(ctxt->loc_fsops, inode->i_sb, inode, handle, 
248                                  force_sync);
249 }
250
251 static inline void *
252 fsfilt_brw_start_log(struct obd_device *obd, int objcount,
253                      struct fsfilt_objinfo *fso, int niocount,
254                      struct niobuf_local *nb, struct obd_trans_info *oti,
255                      int logs)
256 {
257         unsigned long now = jiffies;
258         void *parent_handle = oti ? oti->oti_handle : NULL;
259         void *handle = obd->obd_fsops->fs_brw_start(objcount, fso, niocount, nb,
260                                                     parent_handle, logs);
261         CDEBUG(D_HA, "started handle %p (%p)\n", handle, parent_handle);
262
263         if (oti != NULL) {
264                 if (parent_handle == NULL) {
265                         oti->oti_handle = handle;
266                 } else if (handle != parent_handle) {
267                         CERROR("mismatch: parent %p, handle %p, oti %p\n",
268                                parent_handle, handle, oti);
269                         LBUG();
270                 }
271         }
272         if (time_after(jiffies, now + 15 * HZ))
273                 CERROR("long journal start time %lus\n", (jiffies - now) / HZ);
274
275         return handle;
276 }
277
278 static inline void *
279 fsfilt_brw_start(struct obd_device *obd, int objcount,
280                  struct fsfilt_objinfo *fso, int niocount,
281                  struct niobuf_local *nb, struct obd_trans_info *oti)
282 {
283         return fsfilt_brw_start_log(obd, objcount, fso, niocount, nb, oti, 0);
284 }
285
286 static inline int
287 fsfilt_commit_async(struct obd_device *obd, struct inode *inode,
288                     void *handle, void **wait_handle)
289 {
290         unsigned long now = jiffies;
291         int rc = obd->obd_fsops->fs_commit_async(inode, handle, wait_handle);
292
293         CDEBUG(D_HA, "committing handle %p (async)\n", *wait_handle);
294         if (time_after(jiffies, now + 15 * HZ))
295                 CERROR("long journal start time %lus\n", (jiffies - now) / HZ);
296
297         return rc;
298 }
299
300 static inline int
301 fsfilt_commit_wait(struct obd_device *obd, struct inode *inode, void *handle)
302 {
303         unsigned long now = jiffies;
304         int rc = obd->obd_fsops->fs_commit_wait(inode, handle);
305         CDEBUG(D_HA, "waiting for completion %p\n", handle);
306         if (time_after(jiffies, now + 15 * HZ))
307                 CERROR("long journal start time %lus\n", (jiffies - now) / HZ);
308         return rc;
309 }
310
311 static inline int
312 fsfilt_setattr(struct obd_device *obd, struct dentry *dentry,
313                void *handle, struct iattr *iattr, int do_trunc)
314 {
315         unsigned long now = jiffies;
316         int rc;
317         rc = obd->obd_fsops->fs_setattr(dentry, handle, iattr, do_trunc);
318         if (time_after(jiffies, now + 15 * HZ))
319                 CERROR("long setattr time %lus\n", (jiffies - now) / HZ);
320         return rc;
321 }
322
323 static inline int
324 fsfilt_iocontrol(struct obd_device *obd, struct inode *inode,
325                  struct file *file, unsigned int cmd,
326                  unsigned long arg)
327 {
328         return obd->obd_fsops->fs_iocontrol(inode, file, cmd, arg);
329 }
330
331 static inline int fsfilt_setup(struct obd_device *obd,
332                                struct super_block *fs)
333 {
334         if (obd->obd_fsops->fs_setup)
335                 return obd->obd_fsops->fs_setup(obd, fs);
336         return 0;
337 }
338
339 static inline int
340 fsfilt_set_md(struct obd_device *obd, struct inode *inode,
341               void *handle, void *md, int size)
342 {
343         return obd->obd_fsops->fs_set_md(inode, handle, md, size);
344 }
345
346 static inline int
347 fsfilt_get_md(struct obd_device *obd, struct inode *inode,
348               void *md, int size)
349 {
350         return obd->obd_fsops->fs_get_md(inode, md, size);
351 }
352
353 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
354 static inline int
355 fsfilt_send_bio(struct obd_device *obd, struct inode *inode,
356                 struct bio *bio)
357 #else
358 static inline int
359 fsfilt_send_bio(struct obd_device *obd, struct inode *inode,
360                 struct kiobuf *bio)
361 #endif
362 {
363         return obd->obd_fsops->fs_send_bio(inode, bio);
364 }
365
366 static inline int
367 fsfilt_putpage(struct obd_device *obd, struct inode *inode,
368                struct page *page)
369 {
370         int rc = 0;
371         struct filter_obd *filter;
372         unsigned long now = jiffies;
373
374         LASSERT(obd != NULL);
375         LASSERT(inode != NULL);
376         LASSERT(page != NULL);
377
378         filter = &obd->u.filter;
379
380         if (!obd->obd_fsops->fs_putpage)
381                 return -ENOSYS;
382
383         CDEBUG(D_INFO, "putpage %lx\n", page->index);
384
385         rc = obd->obd_fsops->fs_putpage(inode, page);
386
387         if (time_after(jiffies, now + 15 * HZ))
388                 CERROR("long putpage time %lus\n", (jiffies - now) / HZ);
389
390         return rc;
391 }
392
393 static inline struct page *
394 fsfilt_getpage(struct obd_device *obd, struct inode *inode,
395                unsigned long index)
396 {
397         struct page *page;
398         unsigned long now = jiffies;
399
400         LASSERT(obd != NULL);
401         LASSERT(inode != NULL);
402
403         if (!obd->obd_fsops->fs_getpage)
404                 return ERR_PTR(-ENOSYS);
405
406         CDEBUG(D_INFO, "getpage %lx\n", index);
407
408         page = obd->obd_fsops->fs_getpage(inode, index);
409
410         if (time_after(jiffies, now + 15 * HZ))
411                 CERROR("long getpage time %lus\n", (jiffies - now) / HZ);
412
413         return page;
414 }
415
416 static inline ssize_t
417 fsfilt_readpage(struct obd_device *obd, struct file *file, char *buf,
418                 size_t count, loff_t *offset)
419 {
420         return obd->obd_fsops->fs_readpage(file, buf, count, offset);
421 }
422
423 static inline int
424 fsfilt_add_journal_cb(struct obd_device *obd, struct super_block *sb,
425                       __u64 last_rcvd, void *handle, fsfilt_cb_t cb_func,
426                       void *cb_data)
427 {
428         return obd->obd_fsops->fs_add_journal_cb(obd, sb, last_rcvd, handle,
429                                                  cb_func, cb_data);
430 }
431
432 /* very similar to obd_statfs(), but caller already holds obd_osfs_lock */
433 static inline int
434 fsfilt_statfs(struct obd_device *obd, struct super_block *sb,
435               unsigned long max_age)
436 {
437         int rc = 0;
438
439         CDEBUG(D_SUPER, "osfs %lu, max_age %lu\n", obd->obd_osfs_age, max_age);
440         if (time_before(obd->obd_osfs_age, max_age)) {
441                 rc = obd->obd_fsops->fs_statfs(sb, &obd->obd_osfs);
442                 if (rc == 0) /* N.B. statfs can't really fail */
443                         obd->obd_osfs_age = jiffies;
444         } else {
445                 CDEBUG(D_SUPER, "using cached obd_statfs data\n");
446         }
447
448         return rc;
449 }
450
451 static inline int
452 fsfilt_sync(struct obd_device *obd, struct super_block *sb)
453 {
454         return obd->obd_fsops->fs_sync(sb);
455 }
456
457 static inline int fsfilt_map_inode_pages(struct obd_device *obd,
458                                          struct inode *inode,
459                                          struct page **page, int pages,
460                                          unsigned long *blocks, int *created,
461                                          int create, struct semaphore *sem)
462 {
463         return obd->obd_fsops->fs_map_inode_pages(inode, page, pages, blocks,
464                                                   created, create, sem);
465 }
466
467 static inline int 
468 fsfilt_write_extents(struct obd_device *obd, struct dentry *dentry, 
469                      unsigned long offset, unsigned long blks)
470 {
471         if (obd->obd_fsops->fs_write_extents)
472                 return obd->obd_fsops->fs_write_extents(dentry, 
473                                                         offset, blks);
474         return 0;
475 }
476
477 static inline int
478 fs_prep_san_write(struct obd_device *obd, struct inode *inode,
479                   long *blocks, int nblocks, loff_t newsize)
480 {
481         return obd->obd_fsops->fs_prep_san_write(inode, blocks,
482                                                  nblocks, newsize);
483 }
484
485 static inline int
486 fsfilt_read_record(struct obd_device *obd, struct file *file,
487                    void *buf, loff_t size, loff_t *offs)
488 {
489         return obd->obd_fsops->fs_read_record(file, buf, size, offs);
490 }
491
492 static inline int 
493 llog_fsfilt_read_record(struct llog_ctxt *ctxt, struct file *file, 
494                         void *buf, loff_t size, loff_t *offs)
495 {
496         return ctxt->loc_fsops->fs_read_record(file, buf, size, offs);
497 }
498
499 static inline int
500 fsfilt_write_record(struct obd_device *obd, struct file *file,
501                     void *buf, loff_t size, loff_t *offs, int force_sync)
502 {
503         return obd->obd_fsops->fs_write_record(file, buf, size, offs,
504                                                force_sync);
505 }
506
507 static inline int
508 llog_fsfilt_write_record(struct llog_ctxt *ctxt, struct file *file,
509                          void *buf, loff_t size, loff_t *offs,
510                          int force_sync)
511 {
512         return ctxt->loc_fsops->fs_write_record(file, buf, size, offs,
513                                                 force_sync);
514 }
515
516 static inline int 
517 fsfilt_set_kml_flags(struct obd_device *obd, struct inode *inode)
518 {
519         if (obd->obd_fsops->fs_set_kml_flags)
520                 return obd->obd_fsops->fs_set_kml_flags(inode);
521         return 0;
522 }
523
524 static inline int 
525 fsfilt_clear_kml_flags(struct obd_device *obd, struct inode *inode)
526 {
527         if (obd->obd_fsops->fs_clear_kml_flags)
528                 return obd->obd_fsops->fs_clear_kml_flags(inode);
529         return 0;
530 }
531 static inline int 
532 fsfilt_precreate_rec(struct obd_device *obd, struct dentry *dentry,
533                      int *num, struct obdo *oa)
534 {
535         if (obd->obd_fsops->fs_precreate_rec)
536                 return obd->obd_fsops->fs_precreate_rec(dentry, num, oa);
537         return 0;
538 }
539
540 static inline int 
541 fsfilt_post_setup(struct obd_device *obd)
542 {
543         if (obd->obd_fsops->fs_post_setup)
544                 return obd->obd_fsops->fs_post_setup(obd, 
545                                 obd->obd_lvfs_ctxt.pwdmnt);
546         return 0;
547 }
548
549 static inline int 
550 fsfilt_post_cleanup(struct obd_device *obd)
551 {
552         if (obd->obd_fsops->fs_post_cleanup)
553                 return obd->obd_fsops->fs_post_cleanup(obd, 
554                                 obd->obd_lvfs_ctxt.pwdmnt);
555         return 0;
556 }
557
558 static inline int 
559 fsfilt_get_ino_write_extents(struct obd_device *obd, 
560                              struct super_block *sb, 
561                              int ino, char **buf, int *size)
562 {
563         if (obd->obd_fsops->fs_get_ino_write_extents)
564                 return obd->obd_fsops->fs_get_ino_write_extents(sb, ino, 
565                                                                 buf, size);
566         return 0;
567 }
568
569 static inline int 
570 fsfilt_free_write_extents(struct obd_device *obd, 
571                           struct super_block *sb, 
572                           int ino, char *buf, int size)
573 {
574         if (obd->obd_fsops->fs_free_write_extents)
575                 return obd->obd_fsops->fs_free_write_extents(sb, ino, 
576                                                              buf, size);
577         return 0;
578 }
579
580 static inline int 
581 fsfilt_get_reint_log_ctxt(struct obd_device *obd,
582                           struct super_block *sb, 
583                           struct llog_ctxt **ctxt)
584 {
585         if (obd->obd_fsops->fs_get_reint_log_ctxt)
586                 return obd->obd_fsops->fs_get_reint_log_ctxt(sb, ctxt);
587         return 0;
588 }
589
590 static inline int 
591 fsfilt_set_ost_flags(struct obd_device *obd, struct super_block *sb) 
592 {
593         if (obd->obd_fsops->fs_set_ost_flags)
594                 return obd->obd_fsops->fs_set_ost_flags(sb);
595         return 0;
596 }
597
598 static inline int 
599 fsfilt_set_mds_flags(struct obd_device *obd, struct super_block *sb) 
600 {
601         if (obd->obd_fsops->fs_set_mds_flags)
602                 return obd->obd_fsops->fs_set_mds_flags(sb);
603         return 0;
604 }
605
606 static inline int 
607 fsfilt_add_dir_entry(struct obd_device *obd, struct dentry *dir,
608                      char *name, int namelen, unsigned long ino,
609                      unsigned long generation, unsigned mds)
610 {
611         LASSERT(obd->obd_fsops->fs_add_dir_entry);
612         return obd->obd_fsops->fs_add_dir_entry(obd, dir, name,
613                                                 namelen, ino, generation, mds);
614 }
615
616 static inline int 
617 fsfilt_del_dir_entry(struct obd_device *obd, struct dentry *dentry)
618 {
619         LASSERT(obd->obd_fsops->fs_del_dir_entry);
620         return obd->obd_fsops->fs_del_dir_entry(obd, dentry);
621 }
622
623 #endif /* __KERNEL__ */
624
625 #endif