• Home
  • Raw
  • Download

Lines Matching refs:sb

75 static void jfs_handle_error(struct super_block *sb)  in jfs_handle_error()  argument
77 struct jfs_sb_info *sbi = JFS_SBI(sb); in jfs_handle_error()
79 if (sb_rdonly(sb)) in jfs_handle_error()
82 updateSuper(sb, FM_DIRTY); in jfs_handle_error()
86 sb->s_id); in jfs_handle_error()
89 sb->s_id); in jfs_handle_error()
90 sb->s_flags |= MS_RDONLY; in jfs_handle_error()
96 void jfs_error(struct super_block *sb, const char *fmt, ...) in jfs_error() argument
107 sb->s_id, __builtin_return_address(0), &vaf); in jfs_error()
111 jfs_handle_error(sb); in jfs_error()
114 static struct inode *jfs_alloc_inode(struct super_block *sb) in jfs_alloc_inode() argument
186 static int jfs_quota_off(struct super_block *sb, int type);
187 static int jfs_quota_on(struct super_block *sb, int type, int format_id,
190 static void jfs_quota_off_umount(struct super_block *sb) in jfs_quota_off_umount() argument
195 jfs_quota_off(sb, type); in jfs_quota_off_umount()
209 static inline void jfs_quota_off_umount(struct super_block *sb) in jfs_quota_off_umount() argument
214 static void jfs_put_super(struct super_block *sb) in jfs_put_super() argument
216 struct jfs_sb_info *sbi = JFS_SBI(sb); in jfs_put_super()
221 jfs_quota_off_umount(sb); in jfs_put_super()
223 rc = jfs_umount(sb); in jfs_put_super()
262 static int parse_options(char *options, struct super_block *sb, s64 *newLVSize, in parse_options() argument
267 struct jfs_sb_info *sbi = JFS_SBI(sb); in parse_options()
316 *newLVSize = i_size_read(sb->s_bdev->bd_inode) >> in parse_options()
317 sb->s_blocksize_bits; in parse_options()
406 struct request_queue *q = bdev_get_queue(sb->s_bdev); in parse_options()
425 struct request_queue *q = bdev_get_queue(sb->s_bdev); in parse_options()
459 static int jfs_remount(struct super_block *sb, int *flags, char *data) in jfs_remount() argument
463 int flag = JFS_SBI(sb)->flag; in jfs_remount()
466 sync_filesystem(sb); in jfs_remount()
467 if (!parse_options(data, sb, &newLVSize, &flag)) in jfs_remount()
471 if (sb_rdonly(sb)) { in jfs_remount()
475 rc = jfs_extendfs(sb, newLVSize, 0); in jfs_remount()
480 if (sb_rdonly(sb) && !(*flags & MS_RDONLY)) { in jfs_remount()
485 truncate_inode_pages(JFS_SBI(sb)->direct_inode->i_mapping, 0); in jfs_remount()
487 JFS_SBI(sb)->flag = flag; in jfs_remount()
488 ret = jfs_mount_rw(sb, 1); in jfs_remount()
491 sb->s_flags &= ~MS_RDONLY; in jfs_remount()
493 dquot_resume(sb, -1); in jfs_remount()
496 if (!sb_rdonly(sb) && (*flags & MS_RDONLY)) { in jfs_remount()
497 rc = dquot_suspend(sb, -1); in jfs_remount()
500 rc = jfs_umount_rw(sb); in jfs_remount()
501 JFS_SBI(sb)->flag = flag; in jfs_remount()
504 if ((JFS_SBI(sb)->flag & JFS_NOINTEGRITY) != (flag & JFS_NOINTEGRITY)) in jfs_remount()
505 if (!sb_rdonly(sb)) { in jfs_remount()
506 rc = jfs_umount_rw(sb); in jfs_remount()
510 JFS_SBI(sb)->flag = flag; in jfs_remount()
511 ret = jfs_mount_rw(sb, 1); in jfs_remount()
514 JFS_SBI(sb)->flag = flag; in jfs_remount()
519 static int jfs_fill_super(struct super_block *sb, void *data, int silent) in jfs_fill_super() argument
527 jfs_info("In jfs_read_super: s_flags=0x%lx", sb->s_flags); in jfs_fill_super()
533 sb->s_fs_info = sbi; in jfs_fill_super()
534 sb->s_max_links = JFS_LINK_MAX; in jfs_fill_super()
535 sbi->sb = sb; in jfs_fill_super()
543 if (!parse_options((char *) data, sb, &newLVSize, &flag)) in jfs_fill_super()
548 sb->s_flags |= MS_POSIXACL; in jfs_fill_super()
559 sb_set_blocksize(sb, PSIZE); in jfs_fill_super()
564 sb->s_op = &jfs_super_operations; in jfs_fill_super()
565 sb->s_export_op = &jfs_export_operations; in jfs_fill_super()
566 sb->s_xattr = jfs_xattr_handlers; in jfs_fill_super()
568 sb->dq_op = &dquot_operations; in jfs_fill_super()
569 sb->s_qcop = &jfs_quotactl_ops; in jfs_fill_super()
570 sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP; in jfs_fill_super()
576 inode = new_inode(sb); in jfs_fill_super()
582 inode->i_size = i_size_read(sb->s_bdev->bd_inode); in jfs_fill_super()
589 rc = jfs_mount(sb); in jfs_fill_super()
595 if (sb_rdonly(sb)) in jfs_fill_super()
598 rc = jfs_mount_rw(sb, 0); in jfs_fill_super()
608 sb->s_magic = JFS_SUPER_MAGIC; in jfs_fill_super()
611 sb->s_d_op = &jfs_ci_dentry_operations; in jfs_fill_super()
613 inode = jfs_iget(sb, ROOT_I); in jfs_fill_super()
618 sb->s_root = d_make_root(inode); in jfs_fill_super()
619 if (!sb->s_root) in jfs_fill_super()
625 sb->s_maxbytes = min(((loff_t)sb->s_blocksize) << 40, MAX_LFS_FILESIZE); in jfs_fill_super()
626 sb->s_time_gran = 1; in jfs_fill_super()
633 rc = jfs_umount(sb); in jfs_fill_super()
649 static int jfs_freeze(struct super_block *sb) in jfs_freeze() argument
651 struct jfs_sb_info *sbi = JFS_SBI(sb); in jfs_freeze()
655 if (!sb_rdonly(sb)) { in jfs_freeze()
656 txQuiesce(sb); in jfs_freeze()
659 jfs_error(sb, "lmLogShutdown failed\n"); in jfs_freeze()
662 txResume(sb); in jfs_freeze()
666 rc = updateSuper(sb, FM_CLEAN); in jfs_freeze()
679 static int jfs_unfreeze(struct super_block *sb) in jfs_unfreeze() argument
681 struct jfs_sb_info *sbi = JFS_SBI(sb); in jfs_unfreeze()
685 if (!sb_rdonly(sb)) { in jfs_unfreeze()
686 rc = updateSuper(sb, FM_MOUNT); in jfs_unfreeze()
688 jfs_error(sb, "updateSuper failed\n"); in jfs_unfreeze()
693 jfs_error(sb, "lmLogInit failed\n"); in jfs_unfreeze()
695 txResume(sb); in jfs_unfreeze()
706 static int jfs_sync_fs(struct super_block *sb, int wait) in jfs_sync_fs() argument
708 struct jfs_log *log = JFS_SBI(sb)->log; in jfs_sync_fs()
716 dquot_writeback_dquots(sb, -1); in jfs_sync_fs()
762 static ssize_t jfs_quota_read(struct super_block *sb, int type, char *data, in jfs_quota_read() argument
765 struct inode *inode = sb_dqopt(sb)->files[type]; in jfs_quota_read()
766 sector_t blk = off >> sb->s_blocksize_bits; in jfs_quota_read()
768 int offset = off & (sb->s_blocksize - 1); in jfs_quota_read()
781 tocopy = sb->s_blocksize - offset < toread ? in jfs_quota_read()
782 sb->s_blocksize - offset : toread; in jfs_quota_read()
792 bh = sb_bread(sb, tmp_bh.b_blocknr); in jfs_quota_read()
807 static ssize_t jfs_quota_write(struct super_block *sb, int type, in jfs_quota_write() argument
810 struct inode *inode = sb_dqopt(sb)->files[type]; in jfs_quota_write()
811 sector_t blk = off >> sb->s_blocksize_bits; in jfs_quota_write()
813 int offset = off & (sb->s_blocksize - 1); in jfs_quota_write()
821 tocopy = sb->s_blocksize - offset < towrite ? in jfs_quota_write()
822 sb->s_blocksize - offset : towrite; in jfs_quota_write()
829 if (offset || tocopy != sb->s_blocksize) in jfs_quota_write()
830 bh = sb_bread(sb, tmp_bh.b_blocknr); in jfs_quota_write()
832 bh = sb_getblk(sb, tmp_bh.b_blocknr); in jfs_quota_write()
868 static int jfs_quota_on(struct super_block *sb, int type, int format_id, in jfs_quota_on() argument
874 err = dquot_quota_on(sb, type, format_id, path); in jfs_quota_on()
889 static int jfs_quota_off(struct super_block *sb, int type) in jfs_quota_off() argument
891 struct inode *inode = sb_dqopt(sb)->files[type]; in jfs_quota_off()
897 err = dquot_quota_off(sb, type); in jfs_quota_off()
910 return dquot_quota_off(sb, type); in jfs_quota_off()