1. 29 5月, 2020 2 次提交
  2. 16 4月, 2020 2 次提交
  3. 02 4月, 2020 1 次提交
  4. 29 3月, 2020 3 次提交
  5. 26 3月, 2020 3 次提交
    • E
      ext4: do not commit super on read-only bdev · c96e2b85
      Eric Sandeen 提交于
      Under some circumstances we may encounter a filesystem error on a
      read-only block device, and if we try to save the error info to the
      superblock and commit it, we'll wind up with a noisy error and
      backtrace, i.e.:
      
      [ 3337.146838] EXT4-fs error (device pmem1p2): ext4_get_journal_inode:4634: comm mount: inode #0: comm mount: iget: illegal inode #
      ------------[ cut here ]------------
      generic_make_request: Trying to write to read-only block-device pmem1p2 (partno 2)
      WARNING: CPU: 107 PID: 115347 at block/blk-core.c:788 generic_make_request_checks+0x6b4/0x7d0
      ...
      
      To avoid this, commit the error info in the superblock only if the
      block device is writable.
      Reported-by: NRitesh Harjani <riteshh@linux.ibm.com>
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Reviewed-by: NAndreas Dilger <adilger@dilger.ca>
      Link: https://lore.kernel.org/r/4b6e774d-cc00-3469-7abb-108eb151071a@sandeen.netSigned-off-by: NTheodore Ts'o <tytso@mit.edu>
      c96e2b85
    • R
      ext4: unregister sysfs path before destroying jbd2 journal · 5e47868f
      Ritesh Harjani 提交于
      Call ext4_unregister_sysfs(), before destroying jbd2 journal,
      since below might cause, NULL pointer dereference issue.
      This got reported with LTP tests.
      
      ext4_put_super() 		cat /sys/fs/ext4/loop2/journal_task
      	| 				ext4_attr_show();
      ext4_jbd2_journal_destroy();  			|
          	|				 journal_task_show()
      	| 					|
      	| 				task_pid_vnr(NULL);
      sbi->s_journal = NULL;
      Signed-off-by: NRitesh Harjani <riteshh@linux.ibm.com>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Link: https://lore.kernel.org/r/20200318061301.4320-1-riteshh@linux.ibm.comSigned-off-by: NTheodore Ts'o <tytso@mit.edu>
      5e47868f
    • R
      ext4: check for non-zero journal inum in ext4_calculate_overhead · f1eec3b0
      Ritesh Harjani 提交于
      While calculating overhead for internal journal, also check
      that j_inum shouldn't be 0. Otherwise we get below error with
      xfstests generic/050 with external journal (XXX_LOGDEV config) enabled.
      
      It could be simply reproduced with loop device with an external journal
      and marking blockdev as RO before mounting.
      
      [ 3337.146838] EXT4-fs error (device pmem1p2): ext4_get_journal_inode:4634: comm mount: inode #0: comm mount: iget: illegal inode #
      ------------[ cut here ]------------
      generic_make_request: Trying to write to read-only block-device pmem1p2 (partno 2)
      WARNING: CPU: 107 PID: 115347 at block/blk-core.c:788 generic_make_request_checks+0x6b4/0x7d0
      CPU: 107 PID: 115347 Comm: mount Tainted: G             L   --------- -t - 4.18.0-167.el8.ppc64le #1
      NIP:  c0000000006f6d44 LR: c0000000006f6d40 CTR: 0000000030041dd4
      <...>
      NIP [c0000000006f6d44] generic_make_request_checks+0x6b4/0x7d0
      LR [c0000000006f6d40] generic_make_request_checks+0x6b0/0x7d0
      <...>
      Call Trace:
      generic_make_request_checks+0x6b0/0x7d0 (unreliable)
      generic_make_request+0x3c/0x420
      submit_bio+0xd8/0x200
      submit_bh_wbc+0x1e8/0x250
      __sync_dirty_buffer+0xd0/0x210
      ext4_commit_super+0x310/0x420 [ext4]
      __ext4_error+0xa4/0x1e0 [ext4]
      __ext4_iget+0x388/0xe10 [ext4]
      ext4_get_journal_inode+0x40/0x150 [ext4]
      ext4_calculate_overhead+0x5a8/0x610 [ext4]
      ext4_fill_super+0x3188/0x3260 [ext4]
      mount_bdev+0x778/0x8f0
      ext4_mount+0x28/0x50 [ext4]
      mount_fs+0x74/0x230
      vfs_kern_mount.part.6+0x6c/0x250
      do_mount+0x2fc/0x1280
      sys_mount+0x158/0x180
      system_call+0x5c/0x70
      EXT4-fs (pmem1p2): no journal found
      EXT4-fs (pmem1p2): can't get journal size
      EXT4-fs (pmem1p2): mounted filesystem without journal. Opts: dax,norecovery
      
      Fixes: 3c816ded ("ext4: use journal inode to determine journal overhead")
      Reported-by: NHarish Sriram <harish@linux.ibm.com>
      Signed-off-by: NRitesh Harjani <riteshh@linux.ibm.com>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Link: https://lore.kernel.org/r/20200316093038.25485-1-riteshh@linux.ibm.comSigned-off-by: NTheodore Ts'o <tytso@mit.edu>
      f1eec3b0
  6. 25 3月, 2020 1 次提交
  7. 24 3月, 2020 1 次提交
    • C
      block: remove __bdevname · ea3edd4d
      Christoph Hellwig 提交于
      There is no good reason for __bdevname to exist.  Just open code
      printing the string in the callers.  For three of them the format
      string can be trivially merged into existing printk statements,
      and in init/do_mounts.c we can at least do the scnprintf once at
      the start of the function, and unconditional of CONFIG_BLOCK to
      make the output for tiny configfs a little more helpful.
      
      Acked-by: Theodore Ts'o <tytso@mit.edu> # for ext4
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      ea3edd4d
  8. 06 3月, 2020 1 次提交
  9. 01 3月, 2020 1 次提交
  10. 22 2月, 2020 3 次提交
  11. 21 2月, 2020 1 次提交
  12. 15 2月, 2020 1 次提交
  13. 14 2月, 2020 2 次提交
  14. 04 2月, 2020 1 次提交
  15. 25 1月, 2020 2 次提交
  16. 18 1月, 2020 3 次提交
  17. 27 12月, 2019 1 次提交
  18. 23 12月, 2019 1 次提交
  19. 16 12月, 2019 1 次提交
  20. 20 11月, 2019 1 次提交
  21. 15 11月, 2019 4 次提交
  22. 07 11月, 2019 1 次提交
    • E
      ext4: add support for IV_INO_LBLK_64 encryption policies · b925acb8
      Eric Biggers 提交于
      IV_INO_LBLK_64 encryption policies have special requirements from the
      filesystem beyond those of the existing encryption policies:
      
      - Inode numbers must never change, even if the filesystem is resized.
      - Inode numbers must be <= 32 bits.
      - File logical block numbers must be <= 32 bits.
      
      ext4 has 32-bit inode and file logical block numbers.  However,
      resize2fs can re-number inodes when shrinking an ext4 filesystem.
      
      However, typically the people who would want to use this format don't
      care about filesystem shrinking.  They'd be fine with a solution that
      just prevents the filesystem from being shrunk.
      
      Therefore, add a new feature flag EXT4_FEATURE_COMPAT_STABLE_INODES that
      will do exactly that.  Then wire up the fscrypt_operations to expose
      this flag to fs/crypto/, so that it allows IV_INO_LBLK_64 policies when
      this flag is set.
      Acked-by: NTheodore Ts'o <tytso@mit.edu>
      Signed-off-by: NEric Biggers <ebiggers@google.com>
      b925acb8
  23. 04 11月, 2019 1 次提交
  24. 23 10月, 2019 1 次提交
  25. 30 8月, 2019 1 次提交
    • D
      ext4: Initialize timestamps limits · 4881c497
      Deepa Dinamani 提交于
      ext4 has different overflow limits for max filesystem
      timestamps based on the extra bytes available.
      
      The timestamp limits are calculated according to the
      encoding table in
      a4dad1aei(ext4: Fix handling of extended tv_sec):
      
      * extra  msb of                         adjust for signed
      * epoch  32-bit                         32-bit tv_sec to
      * bits   time    decoded 64-bit tv_sec  64-bit tv_sec      valid time range
      * 0 0    1    -0x80000000..-0x00000001  0x000000000   1901-12-13..1969-12-31
      * 0 0    0    0x000000000..0x07fffffff  0x000000000   1970-01-01..2038-01-19
      * 0 1    1    0x080000000..0x0ffffffff  0x100000000   2038-01-19..2106-02-07
      * 0 1    0    0x100000000..0x17fffffff  0x100000000   2106-02-07..2174-02-25
      * 1 0    1    0x180000000..0x1ffffffff  0x200000000   2174-02-25..2242-03-16
      * 1 0    0    0x200000000..0x27fffffff  0x200000000   2242-03-16..2310-04-04
      * 1 1    1    0x280000000..0x2ffffffff  0x300000000   2310-04-04..2378-04-22
      * 1 1    0    0x300000000..0x37fffffff  0x300000000   2378-04-22..2446-05-10
      
      Note that the time limits are not correct for deletion times.
      
      Added a warn when an inode cannot be extended to incorporate an
      extended timestamp.
      Signed-off-by: NDeepa Dinamani <deepa.kernel@gmail.com>
      Reviewed-by: NAndreas Dilger <adilger@dilger.ca>
      Acked-by: NJeff Layton <jlayton@kernel.org>
      Cc: tytso@mit.edu
      Cc: adilger.kernel@dilger.ca
      Cc: linux-ext4@vger.kernel.org
      4881c497