super.c (78af34f03d33d2ba179c9d35685860170b94a285) | super.c (1cf3109ffb26a6ea572fd02436bd10458b4b2187) |
---|---|
1/* 2 * super.c - NTFS kernel super block handling. Part of the Linux-NTFS project. 3 * 4 * Copyright (c) 2001-2006 Anton Altaparmakov 5 * Copyright (c) 2001,2002 Richard Russon 6 * 7 * This program/include file is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License as published --- 458 unchanged lines hidden (view full) --- 467 ntfs_error(sb, "Volume has errors and is read-only%s", 468 es); 469 return -EROFS; 470 } 471 if (vol->vol_flags & VOLUME_IS_DIRTY) { 472 ntfs_error(sb, "Volume is dirty and read-only%s", es); 473 return -EROFS; 474 } | 1/* 2 * super.c - NTFS kernel super block handling. Part of the Linux-NTFS project. 3 * 4 * Copyright (c) 2001-2006 Anton Altaparmakov 5 * Copyright (c) 2001,2002 Richard Russon 6 * 7 * This program/include file is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License as published --- 458 unchanged lines hidden (view full) --- 467 ntfs_error(sb, "Volume has errors and is read-only%s", 468 es); 469 return -EROFS; 470 } 471 if (vol->vol_flags & VOLUME_IS_DIRTY) { 472 ntfs_error(sb, "Volume is dirty and read-only%s", es); 473 return -EROFS; 474 } |
475 if (vol->vol_flags & VOLUME_MODIFIED_BY_CHKDSK) { 476 ntfs_error(sb, "Volume has been modified by chkdsk " 477 "and is read-only%s", es); 478 return -EROFS; 479 } |
|
475 if (vol->vol_flags & VOLUME_MUST_MOUNT_RO_MASK) { | 480 if (vol->vol_flags & VOLUME_MUST_MOUNT_RO_MASK) { |
476 ntfs_error(sb, "Volume has unsupported flags set and " 477 "is read-only%s", es); | 481 ntfs_error(sb, "Volume has unsupported flags set " 482 "(0x%x) and is read-only%s", 483 (unsigned)le16_to_cpu(vol->vol_flags), 484 es); |
478 return -EROFS; 479 } 480 if (ntfs_set_volume_flags(vol, VOLUME_IS_DIRTY)) { 481 ntfs_error(sb, "Failed to set dirty bit in volume " 482 "information flags%s", es); 483 return -EROFS; 484 } 485#if 0 --- 1354 unchanged lines hidden (view full) --- 1840 "volume version %i.%i (need at least version " 1841 "3.0).", vol->major_ver, vol->minor_ver); 1842 NVolClearSparseEnabled(vol); 1843 } 1844#ifdef NTFS_RW 1845 /* Make sure that no unsupported volume flags are set. */ 1846 if (vol->vol_flags & VOLUME_MUST_MOUNT_RO_MASK) { 1847 static const char *es1a = "Volume is dirty"; | 485 return -EROFS; 486 } 487 if (ntfs_set_volume_flags(vol, VOLUME_IS_DIRTY)) { 488 ntfs_error(sb, "Failed to set dirty bit in volume " 489 "information flags%s", es); 490 return -EROFS; 491 } 492#if 0 --- 1354 unchanged lines hidden (view full) --- 1847 "volume version %i.%i (need at least version " 1848 "3.0).", vol->major_ver, vol->minor_ver); 1849 NVolClearSparseEnabled(vol); 1850 } 1851#ifdef NTFS_RW 1852 /* Make sure that no unsupported volume flags are set. */ 1853 if (vol->vol_flags & VOLUME_MUST_MOUNT_RO_MASK) { 1854 static const char *es1a = "Volume is dirty"; |
1848 static const char *es1b = "Volume has unsupported flags set"; 1849 static const char *es2 = ". Run chkdsk and mount in Windows."; 1850 const char *es1; 1851 1852 es1 = vol->vol_flags & VOLUME_IS_DIRTY ? es1a : es1b; | 1855 static const char *es1b = "Volume has been modified by chkdsk"; 1856 static const char *es1c = "Volume has unsupported flags set"; 1857 static const char *es2a = ". Run chkdsk and mount in Windows."; 1858 static const char *es2b = ". Mount in Windows."; 1859 const char *es1, *es2; 1860 1861 es2 = es2a; 1862 if (vol->vol_flags & VOLUME_IS_DIRTY) 1863 es1 = es1a; 1864 else if (vol->vol_flags & VOLUME_MODIFIED_BY_CHKDSK) { 1865 es1 = es1b; 1866 es2 = es2b; 1867 } else { 1868 es1 = es1c; 1869 ntfs_warning(sb, "Unsupported volume flags 0x%x " 1870 "encountered.", 1871 (unsigned)le16_to_cpu(vol->vol_flags)); 1872 } |
1853 /* If a read-write mount, convert it to a read-only mount. */ 1854 if (!(sb->s_flags & MS_RDONLY)) { 1855 if (!(vol->on_errors & (ON_ERRORS_REMOUNT_RO | 1856 ON_ERRORS_CONTINUE))) { 1857 ntfs_error(sb, "%s and neither on_errors=" 1858 "continue nor on_errors=" 1859 "remount-ro was specified%s", 1860 es1, es2); --- 1366 unchanged lines hidden --- | 1873 /* If a read-write mount, convert it to a read-only mount. */ 1874 if (!(sb->s_flags & MS_RDONLY)) { 1875 if (!(vol->on_errors & (ON_ERRORS_REMOUNT_RO | 1876 ON_ERRORS_CONTINUE))) { 1877 ntfs_error(sb, "%s and neither on_errors=" 1878 "continue nor on_errors=" 1879 "remount-ro was specified%s", 1880 es1, es2); --- 1366 unchanged lines hidden --- |