Lines Matching refs:sb

206 			ntfs_warning(vol->sb, "Ignoring obsolete option %s.",  in parse_options()
210 ntfs_warning(vol->sb, "Option iocharset is " in parse_options()
221 ntfs_error(vol->sb, "NLS character set " in parse_options()
225 ntfs_error(vol->sb, "NLS character set %s not " in parse_options()
234 ntfs_warning(vol->sb, "Option utf8 is no longer " in parse_options()
248 ntfs_error(vol->sb, "Unrecognized mount option %s.", p); in parse_options()
261 ntfs_warning(vol->sb, "Sloppy option given. Ignoring " in parse_options()
266 ntfs_error(vol->sb, "Invalid errors option argument " in parse_options()
273 ntfs_error(vol->sb, "Cannot change NLS character set " in parse_options()
283 ntfs_error(vol->sb, "Failed to load default " in parse_options()
294 ntfs_error(vol->sb, "Cannot change mft_zone_multiplier " in parse_options()
299 ntfs_error(vol->sb, "Invalid mft_zone_multiplier. " in parse_options()
337 ntfs_warning(vol->sb, "Not enabling sparse " in parse_options()
348 ntfs_error(vol->sb, "The %s option requires an argument.", p); in parse_options()
351 ntfs_error(vol->sb, "The %s option requires a boolean argument.", p); in parse_options()
354 ntfs_error(vol->sb, "Invalid %s option argument: %s", p, ov); in parse_options()
417 ntfs_error(vol->sb, "Failed with error code %i.", -err); in ntfs_write_volume_flags()
466 static int ntfs_remount(struct super_block *sb, int *flags, char *opt) in ntfs_remount() argument
468 ntfs_volume *vol = NTFS_SB(sb); in ntfs_remount()
472 sync_filesystem(sb); in ntfs_remount()
490 if ((sb->s_flags & MS_RDONLY) && !(*flags & MS_RDONLY)) { in ntfs_remount()
495 ntfs_error(sb, "Volume has errors and is read-only%s", in ntfs_remount()
500 ntfs_error(sb, "Volume is dirty and read-only%s", es); in ntfs_remount()
504 ntfs_error(sb, "Volume has been modified by chkdsk " in ntfs_remount()
509 ntfs_error(sb, "Volume has unsupported flags set " in ntfs_remount()
516 ntfs_error(sb, "Failed to set dirty bit in volume " in ntfs_remount()
526 ntfs_error(sb, "Failed to set NT4 " in ntfs_remount()
534 ntfs_error(sb, "Failed to empty journal $LogFile%s", in ntfs_remount()
540 ntfs_error(sb, "Failed to mark quotas out of date%s", in ntfs_remount()
546 ntfs_error(sb, "Failed to stamp transation log " in ntfs_remount()
551 } else if (!(sb->s_flags & MS_RDONLY) && (*flags & MS_RDONLY)) { in ntfs_remount()
555 ntfs_warning(sb, "Failed to clear dirty bit " in ntfs_remount()
583 static bool is_boot_sector_ntfs(const struct super_block *sb, in is_boot_sector_ntfs() argument
600 ntfs_warning(sb, "Invalid boot sector checksum."); in is_boot_sector_ntfs()
651 ntfs_warning(sb, "Invalid end of sector marker."); in is_boot_sector_ntfs()
676 static struct buffer_head *read_ntfs_boot_sector(struct super_block *sb, in read_ntfs_boot_sector() argument
681 sector_t nr_blocks = NTFS_SB(sb)->nr_blocks; in read_ntfs_boot_sector()
684 if ((bh_primary = sb_bread(sb, 0))) { in read_ntfs_boot_sector()
685 if (is_boot_sector_ntfs(sb, (NTFS_BOOT_SECTOR*) in read_ntfs_boot_sector()
689 ntfs_error(sb, "Primary boot sector is invalid."); in read_ntfs_boot_sector()
691 ntfs_error(sb, read_err_str, "primary"); in read_ntfs_boot_sector()
692 if (!(NTFS_SB(sb)->on_errors & ON_ERRORS_RECOVER)) { in read_ntfs_boot_sector()
696 ntfs_error(sb, "Mount option errors=recover not used. " in read_ntfs_boot_sector()
701 if ((bh_backup = sb_bread(sb, nr_blocks - 1))) { in read_ntfs_boot_sector()
702 if (is_boot_sector_ntfs(sb, (NTFS_BOOT_SECTOR*) in read_ntfs_boot_sector()
707 ntfs_error(sb, read_err_str, "backup"); in read_ntfs_boot_sector()
709 if ((bh_backup = sb_bread(sb, nr_blocks >> 1))) { in read_ntfs_boot_sector()
710 if (is_boot_sector_ntfs(sb, (NTFS_BOOT_SECTOR*) in read_ntfs_boot_sector()
714 ntfs_error(sb, "Could not find a valid backup boot " in read_ntfs_boot_sector()
718 ntfs_error(sb, read_err_str, "backup"); in read_ntfs_boot_sector()
735 if (!(sb->s_flags & MS_RDONLY)) { in read_ntfs_boot_sector()
736 ntfs_warning(sb, "Hot-fix: Recovering invalid primary " in read_ntfs_boot_sector()
746 ntfs_error(sb, "Hot-fix: Device write error while " in read_ntfs_boot_sector()
749 ntfs_warning(sb, "Hot-fix: Recovery of primary boot " in read_ntfs_boot_sector()
754 ntfs_warning(sb, "Using backup boot sector."); in read_ntfs_boot_sector()
778 if (vol->sector_size < vol->sb->s_blocksize) { in parse_ntfs_boot_sector()
779 ntfs_error(vol->sb, "Sector size (%i) is smaller than the " in parse_ntfs_boot_sector()
782 vol->sb->s_blocksize); in parse_ntfs_boot_sector()
799 ntfs_error(vol->sb, "Cluster size (%i) is smaller than the " in parse_ntfs_boot_sector()
830 ntfs_error(vol->sb, "Mft record size (%i) exceeds the " in parse_ntfs_boot_sector()
838 ntfs_error(vol->sb, "Mft record size (%i) is smaller than the " in parse_ntfs_boot_sector()
869 ntfs_error(vol->sb, "Index record size (%i) is smaller than " in parse_ntfs_boot_sector()
882 ntfs_error(vol->sb, "Cannot handle 64-bit clusters. Sorry."); in parse_ntfs_boot_sector()
894 ntfs_error(vol->sb, "Volume size (%lluTiB) is too " in parse_ntfs_boot_sector()
904 ntfs_error(vol->sb, "MFT LCN (%lli, 0x%llx) is beyond end of " in parse_ntfs_boot_sector()
913 ntfs_error(vol->sb, "MFTMirr LCN (%lli, 0x%llx) is beyond end " in parse_ntfs_boot_sector()
1041 tmp_ino = ntfs_iget(vol->sb, FILE_MFTMirr); in load_and_init_mft_mirror()
1089 struct super_block *sb = vol->sb; in check_mft_mirror() local
1118 ntfs_error(sb, "Failed to read $MFT."); in check_mft_mirror()
1126 ntfs_error(sb, "Failed to read $MFTMirr."); in check_mft_mirror()
1136 ntfs_error(sb, "Incomplete multi sector " in check_mft_mirror()
1149 ntfs_error(sb, "Incomplete multi sector " in check_mft_mirror()
1168 ntfs_error(sb, "$MFT and $MFTMirr (record %i) do not " in check_mft_mirror()
1199 ntfs_error(sb, "$MFTMirr location mismatch. " in check_mft_mirror()
1222 tmp_ino = ntfs_iget(vol->sb, FILE_LogFile); in load_and_check_logfile()
1300 ntfs_error(vol->sb, "Failed to find inode number for " in check_windows_hibernation_status()
1307 vi = ntfs_iget(vol->sb, MREF(mref)); in check_windows_hibernation_status()
1311 ntfs_error(vol->sb, "Failed to load hiberfil.sys."); in check_windows_hibernation_status()
1322 ntfs_error(vol->sb, "Failed to read from hiberfil.sys."); in check_windows_hibernation_status()
1400 ntfs_error(vol->sb, "Failed to find inode number for $Quota."); in load_and_init_quota()
1406 tmp_ino = ntfs_iget(vol->sb, MREF(mref)); in load_and_init_quota()
1410 ntfs_error(vol->sb, "Failed to load $Quota."); in load_and_init_quota()
1417 ntfs_error(vol->sb, "Failed to load $Quota/$Q index."); in load_and_init_quota()
1484 ntfs_error(vol->sb, "Failed to find inode number for " in load_and_init_usnjrnl()
1491 tmp_ino = ntfs_iget(vol->sb, MREF(mref)); in load_and_init_usnjrnl()
1495 ntfs_error(vol->sb, "Failed to load $UsnJrnl."); in load_and_init_usnjrnl()
1512 ntfs_error(vol->sb, "Failed to load $UsnJrnl/$DATA/$Max " in load_and_init_usnjrnl()
1518 ntfs_error(vol->sb, "Found corrupt $UsnJrnl/$DATA/$Max " in load_and_init_usnjrnl()
1527 ntfs_error(vol->sb, "Failed to load $UsnJrnl/$DATA/$J " in load_and_init_usnjrnl()
1535 ntfs_error(vol->sb, "$UsnJrnl/$DATA/$J attribute is resident " in load_and_init_usnjrnl()
1542 ntfs_error(vol->sb, "Failed to read from $UsnJrnl/$DATA/$Max " in load_and_init_usnjrnl()
1550 ntfs_error(vol->sb, "Allocation delta (0x%llx) exceeds " in load_and_init_usnjrnl()
1573 ntfs_error(vol->sb, "$UsnJrnl has lowest valid usn (0x%llx) " in load_and_init_usnjrnl()
1595 struct super_block *sb = vol->sb; in load_and_init_attrdef() local
1603 ino = ntfs_iget(sb, FILE_AttrDef); in load_and_init_attrdef()
1645 ntfs_error(sb, "Failed to initialize attribute definition table."); in load_and_init_attrdef()
1660 struct super_block *sb = vol->sb; in load_and_init_upcase() local
1669 ino = ntfs_iget(sb, FILE_UpCase); in load_and_init_upcase()
1746 ntfs_error(sb, "Failed to load $UpCase from the volume. Using " in load_and_init_upcase()
1751 ntfs_error(sb, "Failed to initialize upcase table."); in load_and_init_upcase()
1774 struct super_block *sb = vol->sb; in load_system_files() local
1792 if (!(sb->s_flags & MS_RDONLY)) { in load_system_files()
1795 ntfs_error(sb, "%s and neither on_errors=" in load_system_files()
1802 sb->s_flags |= MS_RDONLY; in load_system_files()
1803 ntfs_error(sb, "%s. Mounting read-only%s", in load_system_files()
1806 ntfs_warning(sb, "%s. Will not be able to remount " in load_system_files()
1816 ntfs_error(sb, "Failed to load $MFT/$BITMAP attribute."); in load_system_files()
1839 vol->lcnbmp_ino = ntfs_iget(sb, FILE_Bitmap); in load_system_files()
1854 ntfs_error(sb, "Failed to load $Bitmap."); in load_system_files()
1861 vol->vol_ino = ntfs_iget(sb, FILE_Volume); in load_system_files()
1866 ntfs_error(sb, "Failed to load $Volume."); in load_system_files()
1876 ntfs_error(sb, "Failed to get attribute search context."); in load_system_files()
1903 ntfs_warning(vol->sb, "Disabling sparse support due to NTFS " in load_system_files()
1926 ntfs_warning(sb, "Unsupported volume flags 0x%x " in load_system_files()
1931 if (!(sb->s_flags & MS_RDONLY)) { in load_system_files()
1934 ntfs_error(sb, "%s and neither on_errors=" in load_system_files()
1940 sb->s_flags |= MS_RDONLY; in load_system_files()
1941 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); in load_system_files()
1943 ntfs_warning(sb, "%s. Will not be able to remount " in load_system_files()
1964 if (!(sb->s_flags & MS_RDONLY)) { in load_system_files()
1967 ntfs_error(sb, "%s and neither on_errors=" in load_system_files()
1977 sb->s_flags |= MS_RDONLY; in load_system_files()
1978 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); in load_system_files()
1980 ntfs_warning(sb, "%s. Will not be able to remount " in load_system_files()
1988 vol->root_ino = ntfs_iget(sb, FILE_root); in load_system_files()
1992 ntfs_error(sb, "Failed to load root directory."); in load_system_files()
2013 if (!(sb->s_flags & MS_RDONLY)) { in load_system_files()
2016 ntfs_error(sb, "%s and neither on_errors=" in load_system_files()
2022 sb->s_flags |= MS_RDONLY; in load_system_files()
2023 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); in load_system_files()
2025 ntfs_warning(sb, "%s. Will not be able to remount " in load_system_files()
2031 if (!(sb->s_flags & MS_RDONLY) && in load_system_files()
2040 ntfs_error(sb, "%s and neither on_errors=continue nor " in load_system_files()
2045 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); in load_system_files()
2046 sb->s_flags |= MS_RDONLY; in load_system_files()
2059 if (!(sb->s_flags & MS_RDONLY) && (vol->major_ver > 1) && in load_system_files()
2067 ntfs_error(sb, "%s and neither on_errors=continue nor " in load_system_files()
2072 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); in load_system_files()
2073 sb->s_flags |= MS_RDONLY; in load_system_files()
2078 if (!(sb->s_flags & MS_RDONLY) && in load_system_files()
2086 ntfs_error(sb, "%s and neither on_errors=continue nor " in load_system_files()
2091 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); in load_system_files()
2092 sb->s_flags |= MS_RDONLY; in load_system_files()
2101 vol->secure_ino = ntfs_iget(sb, FILE_Secure); in load_system_files()
2105 ntfs_error(sb, "Failed to load $Secure."); in load_system_files()
2110 vol->extend_ino = ntfs_iget(sb, FILE_Extend); in load_system_files()
2114 ntfs_error(sb, "Failed to load $Extend."); in load_system_files()
2124 if (!(sb->s_flags & MS_RDONLY)) { in load_system_files()
2127 ntfs_error(sb, "%s and neither on_errors=" in load_system_files()
2133 sb->s_flags |= MS_RDONLY; in load_system_files()
2134 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); in load_system_files()
2136 ntfs_warning(sb, "%s. Will not be able to remount " in load_system_files()
2142 if (!(sb->s_flags & MS_RDONLY) && in load_system_files()
2150 ntfs_error(sb, "%s and neither on_errors=continue nor " in load_system_files()
2155 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); in load_system_files()
2156 sb->s_flags |= MS_RDONLY; in load_system_files()
2168 if (!(sb->s_flags & MS_RDONLY)) { in load_system_files()
2171 ntfs_error(sb, "%s and neither on_errors=" in load_system_files()
2177 sb->s_flags |= MS_RDONLY; in load_system_files()
2178 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); in load_system_files()
2180 ntfs_warning(sb, "%s. Will not be able to remount " in load_system_files()
2186 if (!(sb->s_flags & MS_RDONLY) && !ntfs_stamp_usnjrnl(vol)) { in load_system_files()
2194 ntfs_error(sb, "%s and neither on_errors=continue nor " in load_system_files()
2199 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); in load_system_files()
2200 sb->s_flags |= MS_RDONLY; in load_system_files()
2272 static void ntfs_put_super(struct super_block *sb) in ntfs_put_super() argument
2274 ntfs_volume *vol = NTFS_SB(sb); in ntfs_put_super()
2324 if (!(sb->s_flags & MS_RDONLY)) { in ntfs_put_super()
2327 ntfs_warning(sb, "Failed to clear dirty bit " in ntfs_put_super()
2336 ntfs_warning(sb, "Volume has errors. Leaving volume " in ntfs_put_super()
2446 sb->s_fs_info = NULL; in ntfs_put_super()
2617 struct super_block *sb = dentry->d_sb; in ntfs_statfs() local
2619 ntfs_volume *vol = NTFS_SB(sb); in ntfs_statfs()
2721 static int ntfs_fill_super(struct super_block *sb, void *opt, const int silent) in ntfs_fill_super() argument
2741 sb->s_flags |= MS_RDONLY; in ntfs_fill_super()
2744 sb->s_fs_info = kmalloc(sizeof(ntfs_volume), GFP_NOFS); in ntfs_fill_super()
2745 vol = NTFS_SB(sb); in ntfs_fill_super()
2748 ntfs_error(sb, "Allocation of NTFS volume structure " in ntfs_fill_super()
2755 .sb = sb, in ntfs_fill_super()
2776 if (bdev_logical_block_size(sb->s_bdev) > PAGE_CACHE_SIZE) { in ntfs_fill_super()
2778 ntfs_error(sb, "Device has unsupported sector size " in ntfs_fill_super()
2782 bdev_logical_block_size(sb->s_bdev), in ntfs_fill_super()
2790 blocksize = sb_min_blocksize(sb, NTFS_BLOCK_SIZE); in ntfs_fill_super()
2793 ntfs_error(sb, "Unable to set device block size."); in ntfs_fill_super()
2796 BUG_ON(blocksize != sb->s_blocksize); in ntfs_fill_super()
2798 blocksize, sb->s_blocksize_bits); in ntfs_fill_super()
2800 if (!i_size_read(sb->s_bdev->bd_inode)) { in ntfs_fill_super()
2802 ntfs_error(sb, "Unable to determine device size."); in ntfs_fill_super()
2805 vol->nr_blocks = i_size_read(sb->s_bdev->bd_inode) >> in ntfs_fill_super()
2806 sb->s_blocksize_bits; in ntfs_fill_super()
2808 if (!(bh = read_ntfs_boot_sector(sb, silent))) { in ntfs_fill_super()
2810 ntfs_error(sb, "Not an NTFS volume."); in ntfs_fill_super()
2821 ntfs_error(sb, "Unsupported NTFS filesystem."); in ntfs_fill_super()
2835 blocksize = sb_set_blocksize(sb, vol->sector_size); in ntfs_fill_super()
2838 ntfs_error(sb, "Unable to set device block " in ntfs_fill_super()
2843 BUG_ON(blocksize != sb->s_blocksize); in ntfs_fill_super()
2844 vol->nr_blocks = i_size_read(sb->s_bdev->bd_inode) >> in ntfs_fill_super()
2845 sb->s_blocksize_bits; in ntfs_fill_super()
2848 blocksize, sb->s_blocksize_bits); in ntfs_fill_super()
2853 sb->s_magic = NTFS_SB_MAGIC; in ntfs_fill_super()
2862 sb->s_maxbytes = MAX_LFS_FILESIZE; in ntfs_fill_super()
2864 sb->s_time_gran = 100; in ntfs_fill_super()
2872 sb->s_op = &ntfs_sops; in ntfs_fill_super()
2873 tmp_ino = new_inode(sb); in ntfs_fill_super()
2876 ntfs_error(sb, "Failed to load essential metadata."); in ntfs_fill_super()
2883 ntfs_error(sb, "Failed to load essential metadata."); in ntfs_fill_super()
2919 ntfs_error(sb, "Failed to load system files."); in ntfs_fill_super()
2925 if ((sb->s_root = d_make_root(vol->root_ino))) { in ntfs_fill_super()
2934 sb->s_export_op = &ntfs_export_ops; in ntfs_fill_super()
2938 ntfs_error(sb, "Failed to allocate root directory."); in ntfs_fill_super()
3036 sb->s_fs_info = NULL; in ntfs_fill_super()