• Home
  • Raw
  • Download

Lines Matching refs:sb

62 static void jfs_handle_error(struct super_block *sb)  in jfs_handle_error()  argument
64 struct jfs_sb_info *sbi = JFS_SBI(sb); in jfs_handle_error()
66 if (sb_rdonly(sb)) in jfs_handle_error()
69 updateSuper(sb, FM_DIRTY); in jfs_handle_error()
73 sb->s_id); in jfs_handle_error()
76 sb->s_id); in jfs_handle_error()
77 sb->s_flags |= SB_RDONLY; in jfs_handle_error()
83 void jfs_error(struct super_block *sb, const char *fmt, ...) in jfs_error() argument
94 sb->s_id, __builtin_return_address(0), &vaf); in jfs_error()
98 jfs_handle_error(sb); in jfs_error()
101 static struct inode *jfs_alloc_inode(struct super_block *sb) in jfs_alloc_inode() argument
157 static int jfs_quota_off(struct super_block *sb, int type);
158 static int jfs_quota_on(struct super_block *sb, int type, int format_id,
161 static void jfs_quota_off_umount(struct super_block *sb) in jfs_quota_off_umount() argument
166 jfs_quota_off(sb, type); in jfs_quota_off_umount()
180 static inline void jfs_quota_off_umount(struct super_block *sb) in jfs_quota_off_umount() argument
185 static void jfs_put_super(struct super_block *sb) in jfs_put_super() argument
187 struct jfs_sb_info *sbi = JFS_SBI(sb); in jfs_put_super()
192 jfs_quota_off_umount(sb); in jfs_put_super()
194 rc = jfs_umount(sb); in jfs_put_super()
233 static int parse_options(char *options, struct super_block *sb, s64 *newLVSize, in parse_options() argument
238 struct jfs_sb_info *sbi = JFS_SBI(sb); in parse_options()
287 *newLVSize = i_size_read(sb->s_bdev->bd_inode) >> in parse_options()
288 sb->s_blocksize_bits; in parse_options()
377 struct request_queue *q = bdev_get_queue(sb->s_bdev); in parse_options()
396 struct request_queue *q = bdev_get_queue(sb->s_bdev); in parse_options()
430 static int jfs_remount(struct super_block *sb, int *flags, char *data) in jfs_remount() argument
434 int flag = JFS_SBI(sb)->flag; in jfs_remount()
437 sync_filesystem(sb); in jfs_remount()
438 if (!parse_options(data, sb, &newLVSize, &flag)) in jfs_remount()
442 if (sb_rdonly(sb)) { in jfs_remount()
446 rc = jfs_extendfs(sb, newLVSize, 0); in jfs_remount()
451 if (sb_rdonly(sb) && !(*flags & SB_RDONLY)) { in jfs_remount()
456 truncate_inode_pages(JFS_SBI(sb)->direct_inode->i_mapping, 0); in jfs_remount()
458 JFS_SBI(sb)->flag = flag; in jfs_remount()
459 ret = jfs_mount_rw(sb, 1); in jfs_remount()
462 sb->s_flags &= ~SB_RDONLY; in jfs_remount()
464 dquot_resume(sb, -1); in jfs_remount()
467 if (!sb_rdonly(sb) && (*flags & SB_RDONLY)) { in jfs_remount()
468 rc = dquot_suspend(sb, -1); in jfs_remount()
471 rc = jfs_umount_rw(sb); in jfs_remount()
472 JFS_SBI(sb)->flag = flag; in jfs_remount()
475 if ((JFS_SBI(sb)->flag & JFS_NOINTEGRITY) != (flag & JFS_NOINTEGRITY)) in jfs_remount()
476 if (!sb_rdonly(sb)) { in jfs_remount()
477 rc = jfs_umount_rw(sb); in jfs_remount()
481 JFS_SBI(sb)->flag = flag; in jfs_remount()
482 ret = jfs_mount_rw(sb, 1); in jfs_remount()
485 JFS_SBI(sb)->flag = flag; in jfs_remount()
490 static int jfs_fill_super(struct super_block *sb, void *data, int silent) in jfs_fill_super() argument
498 jfs_info("In jfs_read_super: s_flags=0x%lx", sb->s_flags); in jfs_fill_super()
504 sb->s_fs_info = sbi; in jfs_fill_super()
505 sb->s_max_links = JFS_LINK_MAX; in jfs_fill_super()
506 sb->s_time_min = 0; in jfs_fill_super()
507 sb->s_time_max = U32_MAX; in jfs_fill_super()
508 sbi->sb = sb; in jfs_fill_super()
516 if (!parse_options((char *) data, sb, &newLVSize, &flag)) in jfs_fill_super()
521 sb->s_flags |= SB_POSIXACL; in jfs_fill_super()
532 sb_set_blocksize(sb, PSIZE); in jfs_fill_super()
537 sb->s_op = &jfs_super_operations; in jfs_fill_super()
538 sb->s_export_op = &jfs_export_operations; in jfs_fill_super()
539 sb->s_xattr = jfs_xattr_handlers; in jfs_fill_super()
541 sb->dq_op = &dquot_operations; in jfs_fill_super()
542 sb->s_qcop = &jfs_quotactl_ops; in jfs_fill_super()
543 sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP; in jfs_fill_super()
549 inode = new_inode(sb); in jfs_fill_super()
555 inode->i_size = i_size_read(sb->s_bdev->bd_inode); in jfs_fill_super()
562 rc = jfs_mount(sb); in jfs_fill_super()
568 if (sb_rdonly(sb)) in jfs_fill_super()
571 rc = jfs_mount_rw(sb, 0); in jfs_fill_super()
581 sb->s_magic = JFS_SUPER_MAGIC; in jfs_fill_super()
584 sb->s_d_op = &jfs_ci_dentry_operations; in jfs_fill_super()
586 inode = jfs_iget(sb, ROOT_I); in jfs_fill_super()
591 sb->s_root = d_make_root(inode); in jfs_fill_super()
592 if (!sb->s_root) in jfs_fill_super()
598 sb->s_maxbytes = min(((loff_t)sb->s_blocksize) << 40, MAX_LFS_FILESIZE); in jfs_fill_super()
599 sb->s_time_gran = 1; in jfs_fill_super()
606 rc = jfs_umount(sb); in jfs_fill_super()
622 static int jfs_freeze(struct super_block *sb) in jfs_freeze() argument
624 struct jfs_sb_info *sbi = JFS_SBI(sb); in jfs_freeze()
628 if (!sb_rdonly(sb)) { in jfs_freeze()
629 txQuiesce(sb); in jfs_freeze()
632 jfs_error(sb, "lmLogShutdown failed\n"); in jfs_freeze()
635 txResume(sb); in jfs_freeze()
639 rc = updateSuper(sb, FM_CLEAN); in jfs_freeze()
652 static int jfs_unfreeze(struct super_block *sb) in jfs_unfreeze() argument
654 struct jfs_sb_info *sbi = JFS_SBI(sb); in jfs_unfreeze()
658 if (!sb_rdonly(sb)) { in jfs_unfreeze()
659 rc = updateSuper(sb, FM_MOUNT); in jfs_unfreeze()
661 jfs_error(sb, "updateSuper failed\n"); in jfs_unfreeze()
666 jfs_error(sb, "lmLogInit failed\n"); in jfs_unfreeze()
668 txResume(sb); in jfs_unfreeze()
679 static int jfs_sync_fs(struct super_block *sb, int wait) in jfs_sync_fs() argument
681 struct jfs_log *log = JFS_SBI(sb)->log; in jfs_sync_fs()
689 dquot_writeback_dquots(sb, -1); in jfs_sync_fs()
735 static ssize_t jfs_quota_read(struct super_block *sb, int type, char *data, in jfs_quota_read() argument
738 struct inode *inode = sb_dqopt(sb)->files[type]; in jfs_quota_read()
739 sector_t blk = off >> sb->s_blocksize_bits; in jfs_quota_read()
741 int offset = off & (sb->s_blocksize - 1); in jfs_quota_read()
754 tocopy = sb->s_blocksize - offset < toread ? in jfs_quota_read()
755 sb->s_blocksize - offset : toread; in jfs_quota_read()
765 bh = sb_bread(sb, tmp_bh.b_blocknr); in jfs_quota_read()
780 static ssize_t jfs_quota_write(struct super_block *sb, int type, in jfs_quota_write() argument
783 struct inode *inode = sb_dqopt(sb)->files[type]; in jfs_quota_write()
784 sector_t blk = off >> sb->s_blocksize_bits; in jfs_quota_write()
786 int offset = off & (sb->s_blocksize - 1); in jfs_quota_write()
794 tocopy = sb->s_blocksize - offset < towrite ? in jfs_quota_write()
795 sb->s_blocksize - offset : towrite; in jfs_quota_write()
802 if (offset || tocopy != sb->s_blocksize) in jfs_quota_write()
803 bh = sb_bread(sb, tmp_bh.b_blocknr); in jfs_quota_write()
805 bh = sb_getblk(sb, tmp_bh.b_blocknr); in jfs_quota_write()
840 static int jfs_quota_on(struct super_block *sb, int type, int format_id, in jfs_quota_on() argument
846 err = dquot_quota_on(sb, type, format_id, path); in jfs_quota_on()
861 static int jfs_quota_off(struct super_block *sb, int type) in jfs_quota_off() argument
863 struct inode *inode = sb_dqopt(sb)->files[type]; in jfs_quota_off()
869 err = dquot_quota_off(sb, type); in jfs_quota_off()
882 return dquot_quota_off(sb, type); in jfs_quota_off()