Lines Matching full:sbi
13 struct autofs_info *autofs_new_ino(struct autofs_sb_info *sbi) in autofs_new_ino() argument
22 ino->sbi = sbi; in autofs_new_ino()
42 struct autofs_sb_info *sbi = autofs_sbi(sb); in autofs_kill_sb() local
50 if (sbi) { in autofs_kill_sb()
52 autofs_catatonic_mode(sbi); in autofs_kill_sb()
53 put_pid(sbi->oz_pgrp); in autofs_kill_sb()
58 if (sbi) in autofs_kill_sb()
59 kfree_rcu(sbi, rcu); in autofs_kill_sb()
64 struct autofs_sb_info *sbi = autofs_sbi(root->d_sb); in autofs_show_options() local
67 if (!sbi) in autofs_show_options()
70 seq_printf(m, ",fd=%d", sbi->pipefd); in autofs_show_options()
77 seq_printf(m, ",pgrp=%d", pid_vnr(sbi->oz_pgrp)); in autofs_show_options()
78 seq_printf(m, ",timeout=%lu", sbi->exp_timeout/HZ); in autofs_show_options()
79 seq_printf(m, ",minproto=%d", sbi->min_proto); in autofs_show_options()
80 seq_printf(m, ",maxproto=%d", sbi->max_proto); in autofs_show_options()
82 if (autofs_type_offset(sbi->type)) in autofs_show_options()
84 else if (autofs_type_direct(sbi->type)) in autofs_show_options()
88 if (sbi->flags & AUTOFS_SBI_STRICTEXPIRE) in autofs_show_options()
90 if (sbi->flags & AUTOFS_SBI_IGNORE) in autofs_show_options()
93 if (sbi->pipe) in autofs_show_options()
94 seq_printf(m, ",pipe_ino=%ld", file_inode(sbi->pipe)->i_ino); in autofs_show_options()
134 struct autofs_sb_info *sbi) in parse_options() argument
146 sbi->min_proto = AUTOFS_MIN_PROTO_VERSION; in parse_options()
147 sbi->max_proto = AUTOFS_MAX_PROTO_VERSION; in parse_options()
149 sbi->pipefd = -1; in parse_options()
165 sbi->pipefd = pipefd; in parse_options()
192 sbi->min_proto = option; in parse_options()
197 sbi->max_proto = option; in parse_options()
200 set_autofs_type_indirect(&sbi->type); in parse_options()
203 set_autofs_type_direct(&sbi->type); in parse_options()
206 set_autofs_type_offset(&sbi->type); in parse_options()
209 sbi->flags |= AUTOFS_SBI_STRICTEXPIRE; in parse_options()
212 sbi->flags |= AUTOFS_SBI_IGNORE; in parse_options()
218 return (sbi->pipefd < 0); in parse_options()
226 struct autofs_sb_info *sbi; in autofs_fill_super() local
232 sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); in autofs_fill_super()
233 if (!sbi) in autofs_fill_super()
235 pr_debug("starting up, sbi = %p\n", sbi); in autofs_fill_super()
237 s->s_fs_info = sbi; in autofs_fill_super()
238 sbi->magic = AUTOFS_SBI_MAGIC; in autofs_fill_super()
239 sbi->pipefd = -1; in autofs_fill_super()
240 sbi->pipe = NULL; in autofs_fill_super()
241 sbi->exp_timeout = 0; in autofs_fill_super()
242 sbi->oz_pgrp = NULL; in autofs_fill_super()
243 sbi->sb = s; in autofs_fill_super()
244 sbi->version = 0; in autofs_fill_super()
245 sbi->sub_version = 0; in autofs_fill_super()
246 sbi->flags = AUTOFS_SBI_CATATONIC; in autofs_fill_super()
247 set_autofs_type_indirect(&sbi->type); in autofs_fill_super()
248 sbi->min_proto = 0; in autofs_fill_super()
249 sbi->max_proto = 0; in autofs_fill_super()
250 mutex_init(&sbi->wq_mutex); in autofs_fill_super()
251 mutex_init(&sbi->pipe_mutex); in autofs_fill_super()
252 spin_lock_init(&sbi->fs_lock); in autofs_fill_super()
253 sbi->queues = NULL; in autofs_fill_super()
254 spin_lock_init(&sbi->lookup_lock); in autofs_fill_super()
255 INIT_LIST_HEAD(&sbi->active_list); in autofs_fill_super()
256 INIT_LIST_HEAD(&sbi->expiring_list); in autofs_fill_super()
267 ino = autofs_new_ino(sbi); in autofs_fill_super()
283 if (parse_options(data, root_inode, &pgrp, &pgrp_set, sbi)) { in autofs_fill_super()
289 if (sbi->max_proto < AUTOFS_MIN_PROTO_VERSION || in autofs_fill_super()
290 sbi->min_proto > AUTOFS_MAX_PROTO_VERSION) { in autofs_fill_super()
293 sbi->min_proto, sbi->max_proto, in autofs_fill_super()
299 if (sbi->max_proto > AUTOFS_MAX_PROTO_VERSION) in autofs_fill_super()
300 sbi->version = AUTOFS_MAX_PROTO_VERSION; in autofs_fill_super()
302 sbi->version = sbi->max_proto; in autofs_fill_super()
303 sbi->sub_version = AUTOFS_PROTO_SUBVERSION; in autofs_fill_super()
306 sbi->oz_pgrp = find_get_pid(pgrp); in autofs_fill_super()
307 if (!sbi->oz_pgrp) { in autofs_fill_super()
313 sbi->oz_pgrp = get_task_pid(current, PIDTYPE_PGID); in autofs_fill_super()
316 if (autofs_type_trigger(sbi->type)) in autofs_fill_super()
323 sbi->pipefd, pid_nr(sbi->oz_pgrp)); in autofs_fill_super()
324 pipe = fget(sbi->pipefd); in autofs_fill_super()
333 sbi->pipe = pipe; in autofs_fill_super()
334 sbi->flags &= ~AUTOFS_SBI_CATATONIC; in autofs_fill_super()
349 put_pid(sbi->oz_pgrp); in autofs_fill_super()
356 kfree(sbi); in autofs_fill_super()