1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Copyright (C) 2003 Cluster File Systems, Inc.
6 * This code is issued under the GNU General Public License.
7 * See the file COPYING in this distribution
10 #ifndef LLITE_INTERNAL_H
11 #define LLITE_INTERNAL_H
13 #include <linux/lustre_debug.h>
14 #include <linux/lustre_audit.h>
16 /* default to about 40meg of readahead on a given system. That much tied
17 * up in 512k readahead requests serviced at 40ms each is about 1GB/s. */
18 #define SBI_DEFAULT_RA_MAX ((40 << 20) >> PAGE_CACHE_SHIFT)
23 RA_STAT_DISTANT_READPAGE,
24 RA_STAT_MISS_IN_WINDOW,
30 RA_STAT_MAX_IN_FLIGHT,
35 unsigned long ra_cur_pages;
36 unsigned long ra_max_pages;
37 unsigned long ra_stats[_NR_RA_STAT];
40 /* after roughly how long should we remove an inactive mount? */
41 #define GNS_MOUNT_TIMEOUT 120
43 /* how often should the GNS timer look for mounts to cleanup? */
44 #define GNS_TICK_TIMEOUT 1
46 /* how many times GNS will try to wait for 1 second for mount */
47 #define GNS_WAIT_ATTEMPTS 10
50 /* this protects pglist and max_r_a_pages. It isn't safe to grab from
51 * interrupt contexts. */
54 struct obd_uuid ll_sb_uuid;
55 struct obd_export *ll_md_exp;
56 struct obd_export *ll_dt_exp;
57 struct lov_desc ll_dt_desc;
58 struct proc_dir_entry *ll_proc_root;
59 struct lustre_id ll_rootid; /* root lustre id */
61 struct lustre_mount_data *ll_lmd;
65 struct list_head ll_conn_chain; /* per-conn chain of SBs */
67 struct hlist_head ll_orphan_dentry_list; /*please don't ask -p*/
68 struct ll_close_queue *ll_lcq;
70 struct lprocfs_stats *ll_stats; /* lprocfs stats counter */
72 unsigned long ll_pglist_gen;
73 struct list_head ll_pglist;
75 struct ll_ra_info ll_ra_info;
77 unsigned int ll_remote; /* remote client? */
80 /* times spent waiting for locks in each call site. These are
81 * all protected by the ll_lock */
82 struct obd_service_time ll_read_stime;
83 struct obd_service_time ll_write_stime;
84 struct obd_service_time ll_grouplock_stime;
85 struct obd_service_time ll_seek_stime;
86 struct obd_service_time ll_setattr_stime;
87 struct obd_service_time ll_brw_stime;
88 // struct obd_service_time ll_done_stime;
90 int ll_config_version; /* last-applied update */
92 /* list of GNS mounts; protected by the dcache_lock */
93 struct list_head ll_mnt_list;
95 struct semaphore ll_gns_sem;
96 spinlock_t ll_gns_lock;
97 wait_queue_head_t ll_gns_waitq;
98 atomic_t ll_gns_enabled;
100 struct timer_list ll_gns_timer;
101 struct list_head ll_gns_sbi_head;
102 struct completion ll_gns_mount_finished;
103 struct dentry *ll_gns_pending_dentry;
105 unsigned long ll_gns_tick;
106 unsigned long ll_gns_timeout;
109 char ll_gns_upcall[PATH_MAX];
111 /* mount object entry name */
112 char ll_gns_oname[PATH_MAX];
113 void *ll_crypto_info;
117 struct completion gc_starting;
118 struct completion gc_finishing;
121 /* mounting states */
122 #define LL_GNS_IDLE (1 << 0)
123 #define LL_GNS_MOUNTING (1 << 1)
124 #define LL_GNS_FINISHED (1 << 2)
126 /* mounts checking flags */
127 #define LL_GNS_UMOUNT (1 << 0)
128 #define LL_GNS_CHECK (1 << 1)
131 * per file-descriptor read-ahead data.
133 struct ll_readahead_state {
136 * index of the last page that read(2) needed and that wasn't in the
137 * cache. Used by ras_update() to detect seeks.
139 * XXX nikita: if access seeks into cached region, Lustre doesn't see
142 unsigned long ras_last_readpage;
144 * number of pages read after last read-ahead window reset. As window
145 * is reset on each seek, this is effectively a number of consecutive
146 * accesses. Maybe ->ras_accessed_in_window is better name.
148 * XXX nikita: window is also reset (by ras_update()) when Lustre
149 * believes that memory pressure evicts read-ahead pages. In that
150 * case, it probably doesn't make sense to expand window to
151 * PTLRPC_MAX_BRW_PAGES on the third access.
153 unsigned long ras_consecutive;
155 * Parameters of current read-ahead window. Handled by
156 * ras_update(). On the initial access to the file or after a seek,
157 * window is reset to 0. After 3 consecutive accesses, window is
158 * expanded to PTLRPC_MAX_BRW_PAGES. Afterwards, window is enlarged by
159 * PTLRPC_MAX_BRW_PAGES chunks up to ->ra_max_pages.
161 unsigned long ras_window_start, ras_window_len;
163 * Where next read-ahead should start at. This lies within read-ahead
164 * window. Read-ahead window is read in pieces rather than at once
165 * because: 1. lustre limits total number of pages under read-ahead by
166 * ->ra_max_pages (see ll_ra_count_get()), 2. client cannot read pages
167 * not covered by DLM lock.
169 unsigned long ras_next_readahead;
173 extern kmem_cache_t *ll_file_data_slab;
174 extern kmem_cache_t *ll_intent_slab;
175 struct lustre_handle;
177 struct ll_file_data {
178 struct ll_readahead_state fd_ras;
181 struct lustre_handle fd_cwlockh;
182 unsigned long fd_gid;
185 struct lov_stripe_md;
187 extern spinlock_t inode_lock;
189 extern void lprocfs_unregister_mountpoint(struct ll_sb_info *sbi);
190 extern struct proc_dir_entry *proc_lustre_fs_root;
192 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
193 # define hlist_del_init list_del_init
196 static inline struct inode *ll_info2i(struct ll_inode_info *lli)
198 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
199 return &lli->lli_vfs_inode;
201 return list_entry(lli, struct inode, u.generic_ip);
207 struct inode *icbd_parent;
208 struct dentry **icbd_childp;
212 #define LLAP_MAGIC 98764321
214 struct ll_async_page {
217 struct page *llap_page;
218 struct list_head llap_pending_write;
219 /* only trust these if the page lock is providing exclusion */
220 unsigned llap_write_queued:1,
221 llap_defer_uptodate:1,
225 struct list_head llap_proc_item;
229 LLAP_ORIGIN_UNKNOWN = 0,
230 LLAP_ORIGIN_READPAGE,
231 LLAP_ORIGIN_READAHEAD,
232 LLAP_ORIGIN_COMMIT_WRITE,
233 LLAP_ORIGIN_WRITEPAGE,
240 #define REMOTE_ACL_HASHSIZE 16
243 struct list_head ra_perm_cache[REMOTE_ACL_HASHSIZE];
245 /* we use one sem per inode, it's kind of coarse: one user must
246 * wait if another user is updating the perm on this inode. but
247 * I guess this is fine is real world usage.
249 struct semaphore ra_update_sem;
252 struct lustre_remote_perm {
253 struct list_head lrp_list;
254 uid_t lrp_auth_uid; /* authenticated uid */
255 gid_t lrp_auth_gid; /* authenticated gid */
256 uint16_t lrp_perm; /* permission bits */
257 uint16_t lrp_valid:1, /* lrp_perm is valid */
258 lrp_setuid:1, /* allow setuid */
259 lrp_setgid:1; /* allow setgid */
260 struct list_head lrp_setxid_perms; /* setxid perms list */
263 struct remote_perm_setxid {
264 struct list_head list; /* permission list */
270 /* llite/lproc_llite.c */
271 int lprocfs_register_mountpoint(struct proc_dir_entry *parent,
272 struct super_block *sb, char *lov,
274 void lprocfs_unregister_mountpoint(struct ll_sb_info *sbi);
277 extern struct file_operations ll_dir_operations;
278 extern struct inode_operations ll_dir_inode_operations;
281 int ll_objects_destroy(struct ptlrpc_request *request,
282 struct inode *dir, int offset);
283 struct inode *ll_iget(struct super_block *sb, ino_t hash,
284 struct lustre_md *lic);
285 struct dentry *ll_find_alias(struct inode *, struct dentry *);
286 int ll_mdc_blocking_ast(struct ldlm_lock *, struct ldlm_lock_desc *,
287 void *data, int flag);
289 int ll_prepare_write(struct file *, struct page *, unsigned from, unsigned to);
290 int ll_commit_write(struct file *, struct page *, unsigned from, unsigned to);
291 int ll_writepage(struct page *page);
292 void ll_inode_fill_obdo(struct inode *inode, int cmd, struct obdo *oa);
293 void ll_ap_completion(void *data, int cmd, struct obdo *oa, int rc);
294 void ll_removepage(struct page *page);
295 int ll_readpage(struct file *file, struct page *page);
296 struct ll_async_page *llap_from_cookie(void *cookie);
297 struct ll_async_page *llap_from_page(struct page *page, unsigned origin);
298 void ll_readahead_init(struct inode *inode, struct ll_readahead_state *ras);
300 struct lpage_data *lpd_cast_private(struct page *page);
302 void ll_ra_accounting(struct page *page, struct address_space *mapping);
303 void ll_truncate(struct inode *inode);
306 extern struct file_operations ll_file_operations;
307 extern struct inode_operations ll_file_inode_operations;
308 int ll_md_real_close(struct obd_export *md_exp,
309 struct inode *inode, int flags);
310 extern int ll_inode_revalidate_it(struct dentry *);
311 int ll_setxattr(struct dentry *, const char *, const void *,
313 int ll_getxattr(struct dentry *, const char *, void *, size_t);
314 int ll_listxattr(struct dentry *, char *, size_t);
315 int ll_removexattr(struct dentry *, const char *);
316 extern int ll_inode_permission(struct inode *, int, struct nameidata *);
317 int ll_get_acl(struct inode *, struct posix_acl **acl,
318 struct ptlrpc_request **req);
319 int ll_refresh_lsm(struct inode *inode, struct lov_stripe_md *lsm);
320 int ll_extent_lock(struct ll_file_data *, struct inode *,
321 struct lov_stripe_md *, int mode, ldlm_policy_data_t *,
322 struct lustre_handle *, int ast_flags,
323 struct obd_service_time *);
324 int ll_extent_unlock(struct ll_file_data *, struct inode *,
325 struct lov_stripe_md *, int mode, struct lustre_handle *);
326 int ll_file_open(struct inode *inode, struct file *file);
327 int ll_file_release(struct inode *inode, struct file *file);
328 int ll_lsm_getattr(struct obd_export *, struct lov_stripe_md *, struct obdo *);
329 int ll_glimpse_size(struct inode *inode);
330 int ll_local_open(struct file *file, struct lookup_intent *it,
331 struct obd_client_handle *och);
332 int ll_md_close(struct obd_export *md_exp, struct inode *inode,
334 int ll_md_och_close(struct obd_export *md_exp, struct inode *inode,
335 struct obd_client_handle *och, int dirty);
336 void ll_och_fill(struct inode *inode, struct lookup_intent *it,
337 struct obd_client_handle *och);
338 int ll_set_audit(struct inode *, __u64);
339 int ll_audit_log(struct inode *, audit_op, int);
341 int ll_getxattr_internal(struct inode *inode, const char *name,
342 void *value, size_t size, __u64 valid);
343 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
344 int ll_getattr(struct vfsmount *mnt, struct dentry *de, struct kstat *stat);
346 void ll_stime_record(struct ll_sb_info *sbi, struct timeval *start,
347 struct obd_service_time *stime);
350 void ll_intent_drop_lock(struct lookup_intent *);
351 void ll_intent_release(struct lookup_intent *);
352 int ll_intent_alloc(struct lookup_intent *);
353 void ll_intent_free(struct lookup_intent *it);
354 extern void ll_set_dd(struct dentry *de);
355 void ll_unhash_aliases(struct inode *);
356 void ll_frob_intent(struct lookup_intent **itp, struct lookup_intent *deft);
357 void ll_lookup_finish_locks(struct lookup_intent *it, struct dentry *dentry);
358 int revalidate_it_finish(struct ptlrpc_request *request, int offset,
359 struct lookup_intent *it, struct dentry *de);
362 /* llite/llite_gns.c */
363 int ll_gns_start_thread(void);
364 void ll_gns_stop_thread(void);
366 int ll_gns_mount_object(struct dentry *dentry,
367 struct vfsmount *mnt);
368 int ll_gns_umount_object(struct vfsmount *mnt);
370 int ll_gns_check_mounts(struct ll_sb_info *sbi,
373 void ll_gns_timer_callback(unsigned long data);
374 void ll_gns_add_timer(struct ll_sb_info *sbi);
375 void ll_gns_del_timer(struct ll_sb_info *sbi);
377 /* llite/llite_lib.c */
378 extern struct super_operations lustre_super_operations;
380 char *ll_read_opt(const char *opt, char *data);
381 int ll_set_opt(const char *opt, char *data, int fl);
382 void ll_options(char *options, char **ost, char **mds, char **gss,
383 char **mds_sec, char **oss_sec, int *async, int *flags);
384 void ll_lli_init(struct ll_inode_info *lli);
385 int ll_fill_super(struct super_block *sb, void *data, int silent);
386 int lustre_fill_super(struct super_block *sb, void *data, int silent);
387 void lustre_put_super(struct super_block *sb);
388 struct inode *ll_inode_from_lock(struct ldlm_lock *lock);
389 void ll_clear_inode(struct inode *inode);
390 int ll_attr2inode(struct inode *inode, struct iattr *attr, int trunc);
391 int ll_setattr_raw(struct inode *inode, struct iattr *attr);
392 int ll_setattr(struct dentry *de, struct iattr *attr);
393 int ll_statfs(struct super_block *sb, struct kstatfs *sfs);
394 int ll_statfs_internal(struct super_block *sb, struct obd_statfs *osfs,
395 unsigned long maxage);
396 void ll_update_inode(struct inode *inode, struct lustre_md *);
397 int ll_fetch_remote_perm(struct inode *inode, struct ptlrpc_request *req,
399 int it_disposition(struct lookup_intent *it, int flag);
400 void it_set_disposition(struct lookup_intent *it, int flag);
401 void ll_read_inode2(struct inode *inode, void *opaque);
402 void ll_delete_inode(struct inode *inode);
403 int ll_iocontrol(struct inode *inode, struct file *file,
404 unsigned int cmd, unsigned long arg);
405 void ll_umount_begin(struct super_block *sb);
406 int ll_prep_inode(struct obd_export *, struct obd_export *, struct inode **inode,
407 struct ptlrpc_request *req, int offset, struct super_block *);
408 __u32 get_uuid2int(const char *name, int len);
409 struct dentry *ll_fh_to_dentry(struct super_block *sb, __u32 *data, int len,
410 int fhtype, int parent);
411 int ll_dentry_to_fh(struct dentry *, __u32 *datap, int *lenp, int need_parent);
412 int null_if_equal(struct ldlm_lock *lock, void *data);
413 int ll_process_config_update(struct ll_sb_info *sbi, int clean);
414 int ll_show_options(struct seq_file *m, struct vfsmount *mnt);
415 int ll_flush_cred(struct inode *inode);
417 int ll_remote_acl_permission(struct inode *inode, int mode);
418 int ll_remote_acl_update(struct inode *inode, struct mds_remote_perm *perm);
419 void ll_inode_invalidate_acl(struct inode *inode);
421 /* llite/special.c */
422 extern struct inode_operations ll_special_inode_operations;
423 extern struct file_operations ll_special_chr_inode_fops;
424 extern struct file_operations ll_special_chr_file_fops;
425 extern struct file_operations ll_special_blk_inode_fops;
426 extern struct file_operations ll_special_fifo_inode_fops;
427 extern struct file_operations ll_special_fifo_file_fops;
428 extern struct file_operations ll_special_sock_inode_fops;
430 /* llite/symlink.c */
431 extern struct inode_operations ll_fast_symlink_inode_operations;
433 /* llite/llite_close.c */
434 struct ll_close_queue {
436 struct list_head lcq_list;
437 wait_queue_head_t lcq_waitq;
438 struct completion lcq_comp;
441 void llap_write_pending(struct inode *inode, struct ll_async_page *llap);
442 void llap_write_complete(struct inode *inode, struct ll_async_page *llap);
443 void ll_open_complete(struct inode *inode);
444 int ll_is_inode_dirty(struct inode *inode);
445 void ll_try_done_writing(struct inode *inode);
446 void ll_queue_done_writing(struct inode *inode);
447 void ll_close_thread_stop(struct ll_close_queue *lcq);
448 int ll_close_thread_start(struct ll_close_queue **lcq_ret);
451 /* llite/llite_mmap.c */
452 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
453 typedef struct rb_root rb_root_t;
454 typedef struct rb_node rb_node_t;
457 struct ll_lock_tree_node {
459 struct list_head lt_locked_item;
461 ldlm_policy_data_t lt_policy;
462 struct lustre_handle lt_lockh;
466 struct ll_lock_tree {
468 struct list_head lt_locked_list;
469 struct ll_file_data *lt_fd;
471 int ll_teardown_mmaps(struct address_space *mapping, __u64 first,
473 int ll_file_mmap(struct file * file, struct vm_area_struct * vma);
474 struct ll_lock_tree_node * ll_node_from_inode(struct inode *inode, __u64 start,
475 __u64 end, ldlm_mode_t mode);
476 int ll_tree_lock(struct ll_lock_tree *tree,
477 struct ll_lock_tree_node *first_node, struct inode *inode,
478 const char *buf, size_t count, int ast_flags);
479 int ll_tree_unlock(struct ll_lock_tree *tree, struct inode *inode);
481 int ll_get_fid(struct obd_export *exp, struct lustre_id *idp,
482 char *filename, struct lustre_id *ret);
485 #define LL_SBI_NOLCK 0x1
486 #define LL_SBI_READAHEAD 0x2
487 #define LL_SUPER_MAGIC 0x0BD00BD0
488 #define LL_MAX_BLKSIZE (4UL * 1024 * 1024)
490 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
491 #define ll_s2sbi(sb) ((struct ll_sb_info *)((sb)->s_fs_info))
492 #define ll_set_sbi(sb, sbi) ((sb)->s_fs_info = sbi)
493 static inline __u64 ll_ts2u64(struct timespec *time)
495 __u64 t = time->tv_sec;
499 #define ll_s2sbi(sb) ((struct ll_sb_info *)((sb)->u.generic_sbp))
500 #define ll_set_sbi(sb, sbi) ((sb)->u.generic_sbp = sbi)
501 static inline __u64 ll_ts2u64(time_t *time)
507 /* don't need an addref as the sb_info should be holding one */
508 static inline struct obd_export *ll_s2dtexp(struct super_block *sb)
510 return ll_s2sbi(sb)->ll_dt_exp;
513 /* don't need an addref as the sb_info should be holding one */
514 static inline struct obd_export *ll_s2mdexp(struct super_block *sb)
516 return ll_s2sbi(sb)->ll_md_exp;
519 static inline struct client_obd *sbi2md(struct ll_sb_info *sbi)
521 struct obd_device *obd = sbi->ll_md_exp->exp_obd;
527 // FIXME: replace the name of this with LL_SB to conform to kernel stuff
528 static inline struct ll_sb_info *ll_i2sbi(struct inode *inode)
530 return ll_s2sbi(inode->i_sb);
533 static inline struct obd_export *ll_i2dtexp(struct inode *inode)
535 return ll_s2dtexp(inode->i_sb);
538 static inline struct obd_export *ll_i2mdexp(struct inode *inode)
540 return ll_s2mdexp(inode->i_sb);
542 static inline int ll_mds_max_easize(struct super_block *sb)
544 return sbi2md(ll_s2sbi(sb))->cl_max_mds_easize;
547 static inline __u64 ll_file_maxbytes(struct inode *inode)
549 return ll_i2info(inode)->lli_maxbytes;
554 ll_inode2id(struct lustre_id *id, struct inode *inode)
556 struct lustre_id *lid = &ll_i2info(inode)->lli_id;
558 mdc_pack_id(id, inode->i_ino, inode->i_generation,
559 (inode->i_mode & S_IFMT), id_group(lid),
564 ll_prepare_mdc_data(struct mdc_op_data *data, struct inode *i1,
565 struct inode *i2, const char *name, int namelen,
569 ll_inode2id(&data->id1, i1);
571 /* it could be directory with mea */
572 data->mea1 = ll_i2info(i1)->lli_mea;
575 ll_inode2id(&data->id2, i2);
576 data->mea2 = ll_i2info(i2)->lli_mea;
581 data->namelen = namelen;
582 data->create_mode = mode;
583 data->mod_time = LTIME_S(CURRENT_TIME);
586 struct crypto_helper_ops {
587 int (*init_it_key)(struct inode *inode, struct lookup_intent *it);
588 int (*create_key)(struct inode *dir, mode_t mode, void **key,
590 int (*get_mac)(struct inode *inode, struct iattr *iattr, void*value,
591 int size, void **key, int* key_size);
592 int (*decrypt_key)(struct inode *inode, struct lookup_intent *it);
593 int (*init_inode_key)(struct inode *inode, void *md_key);
594 int (*destroy_key)(struct inode *inode);
597 /*llite crypto ops for crypto api*/
598 struct ll_crypto_info {
599 struct obd_export *ll_gt_exp;
600 struct list_head ll_cops_list;
601 struct crypto_helper_ops *ll_cops;
604 #define ll_page2key(page) ((ll_i2info(page->mapping->host))->lli_key_info)
605 static inline struct ll_crypto_info* ll_s2crpi(struct super_block *sb)
607 return (struct ll_crypto_info*)ll_s2sbi(sb)->ll_crypto_info;
609 static inline struct ll_crypto_info* ll_i2crpi(struct inode *inode)
611 return (struct ll_crypto_info*)ll_i2sbi(inode)->ll_crypto_info;
614 static inline struct crypto_helper_ops* ll_i2crpops(struct inode *inode)
616 return ll_i2crpi(inode)->ll_cops;
619 static inline struct crypto_helper_ops* ll_s2crpops(struct super_block *sb)
621 return ll_s2crpi(sb)->ll_cops;
624 static inline struct obd_export *ll_s2gsexp(struct super_block *sb)
626 struct ll_crypto_info *llci = ll_s2crpi(sb);
628 return llci->ll_gt_exp;
631 static inline struct obd_export *ll_i2gsexp(struct inode *inode)
633 return ll_s2gsexp(inode->i_sb);
637 int ll_crypto_init_it_key(struct inode *inode, struct lookup_intent *it)
639 struct ll_crypto_info *lci = ll_i2crpi(inode);
641 struct crypto_helper_ops *ops = lci->ll_cops;;
642 if (ops && ops->init_it_key)
643 return ops->init_it_key(inode, it);
649 int ll_crypto_create_key(struct inode *inode, mode_t mode, void **key,
652 struct ll_crypto_info *lci = ll_i2crpi(inode);
654 struct crypto_helper_ops *ops = lci->ll_cops;;
655 if (ops && ops->create_key)
656 return ops->create_key(inode, mode, key, key_size);
662 int ll_crypto_get_mac(struct inode *inode, struct iattr *attr, void *acl,
663 int acl_size, void **mac, int *mac_size)
665 struct ll_crypto_info *lci = ll_i2crpi(inode);
667 struct crypto_helper_ops *ops = lci->ll_cops;
668 if (ops && ops->get_mac)
669 return ops->get_mac(inode, attr, acl, acl_size,
676 int ll_crypto_decrypt_key(struct inode *inode, struct lookup_intent *it)
678 struct ll_crypto_info *lci = ll_i2crpi(inode);
680 struct crypto_helper_ops *ops = lci->ll_cops;
681 if (ops && ops->decrypt_key)
682 return ops->decrypt_key(inode, it);
688 int ll_crypto_init_inode_key(struct inode *inode, void *md_key)
690 struct ll_crypto_info *lci = ll_i2crpi(inode);
692 struct crypto_helper_ops *ops = lci->ll_cops;
693 if (ops && ops->init_inode_key)
694 return ops->init_inode_key(inode, md_key);
700 int ll_crypto_destroy_inode_key(struct inode *inode)
702 struct ll_crypto_info *lci = ll_i2crpi(inode);
704 struct crypto_helper_ops *ops = lci->ll_cops;
705 if (ops && ops->destroy_key)
706 return ops->destroy_key(inode);
711 int lustre_init_crypto(struct super_block *sb, char *gkc,
712 struct obd_connect_data *data, int async);
713 int lustre_destroy_crypto(struct super_block *sb);
714 int ll_set_sb_gksinfo(struct super_block *sb, char *type);
715 /* pass this flag to ll_md_real_close() to send close rpc right away */
716 #define FMODE_SYNC 00000010
717 #endif /* LLITE_INTERNAL_H */