An error occurred fetching the project authors.
  1. 31 Jul, 2020 3 commits
  2. 30 Jul, 2020 1 commit
  3. 16 Jul, 2020 1 commit
  4. 24 Mar, 2020 1 commit
    • Christoph Hellwig's avatar
      block: remove __bdevname · ea3edd4d
      Christoph Hellwig authored
      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: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      ea3edd4d
  5. 16 Dec, 2019 1 commit
  6. 12 Dec, 2019 2 commits
    • Dominik Brodowski's avatar
      init: use do_mount() instead of ksys_mount() · cccaa5e3
      Dominik Brodowski authored
      In prepare_namespace(), do_mount() can be used instead of ksys_mount()
      as the first and third argument are const strings in the kernel, the
      second and fourth argument are passed through anyway, and the fifth
      argument is NULL.
      
      In do_mount_root(), ksys_mount() is called with the first and third
      argument being already kernelspace strings, which do not need to be
      copied over from userspace to kernelspace (again). The second and
      fourth arguments are passed through to do_mount() anyway. The fifth
      argument, while already residing in kernelspace, needs to be put into
      a page of its own. Then, do_mount() can be used instead of
      ksys_mount().
      
      Once this is done, there are no in-kernel users to ksys_mount() left,
      which can therefore be removed.
      Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
      cccaa5e3
    • Dominik Brodowski's avatar
      devtmpfs: use do_mount() instead of ksys_mount() · 5e787dbf
      Dominik Brodowski authored
      In devtmpfs, do_mount() can be called directly instead of complex wrapping
      by ksys_mount():
      - the first and third arguments are const strings in the kernel,
        and do not need to be copied over from userspace;
      - the fifth argument is NULL, and therefore no page needs to be
        copied over from userspace;
      - the second and fourth argument are passed through anyway.
      Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
      5e787dbf
  7. 02 Oct, 2019 1 commit
  8. 13 Sep, 2019 1 commit
    • David Howells's avatar
      vfs: Convert ramfs, shmem, tmpfs, devtmpfs, rootfs to use the new mount API · f3235626
      David Howells authored
      Convert the ramfs, shmem, tmpfs, devtmpfs and rootfs filesystems to the new
      internal mount API as the old one will be obsoleted and removed.  This
      allows greater flexibility in communication of mount parameters between
      userspace, the VFS and the filesystem.
      
      See Documentation/filesystems/mount_api.txt for more information.
      
      Note that tmpfs is slightly tricky as it can contain embedded commas, so it
      can't be trivially split up using strsep() to break on commas in
      generic_parse_monolithic().  Instead, tmpfs has to supply its own generic
      parser.
      
      However, if tmpfs changes, then devtmpfs and rootfs, which are wrappers
      around tmpfs or ramfs, must change too - and thus so must ramfs, so these
      had to be converted also.
      
      [AV: rewritten]
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: Hugh Dickins <hughd@google.com>
      cc: linux-mm@kvack.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      f3235626
  9. 05 Sep, 2019 2 commits
  10. 05 Jul, 2019 3 commits
    • Al Viro's avatar
      mnt_init(): call shmem_init() unconditionally · 037f11b4
      Al Viro authored
      No point having two call sites (earlier in init_rootfs() from
      mnt_init() in case we are going to use shmem-style rootfs,
      later from do_basic_setup() unconditionally), along with the
      logics in shmem_init() itself to make the second call a no-op...
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      037f11b4
    • Al Viro's avatar
      don't bother with registering rootfs · fd3e007f
      Al Viro authored
      init_mount_tree() can get to rootfs_fs_type directly and that simplifies
      a lot of things.  We don't need to register it, we don't need to look
      it up *and* we don't need to bother with preventing subsequent userland
      mounts.  That's the way we should've done that from the very beginning.
      
      There is a user-visible change, namely the disappearance of "rootfs"
      from /proc/filesystems.  Note that it's been unmountable all along
      and it didn't show up in /proc/mounts; however, it *is* a user-visible
      change and theoretically some script might've been using its presence
      in /proc/filesystems to tell 2.4.11+ from earlier kernels.
      
      *IF* any complaints about behaviour change do show up, we could fake
      it in /proc/filesystems.  I very much doubt we'll have to, though.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      fd3e007f
    • Al Viro's avatar
      init_rootfs(): don't bother with init_ramfs_fs() · 14a253ce
      Al Viro authored
      the only thing done by the latter is making ramfs visible
      to mount(2); we don't need it there - rootfs is separate
      and, in fact, made visible to mount(2) in the same init_rootfs().
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      14a253ce
  11. 21 May, 2019 1 commit
  12. 20 Dec, 2018 1 commit
  13. 31 Oct, 2018 1 commit
  14. 22 Aug, 2018 1 commit
  15. 02 Apr, 2018 7 commits
  16. 16 Nov, 2017 1 commit
  17. 17 Jul, 2017 2 commits
    • David Howells's avatar
      VFS: Differentiate mount flags (MS_*) from internal superblock flags · e462ec50
      David Howells authored
      Differentiate the MS_* flags passed to mount(2) from the internal flags set
      in the super_block's s_flags.  s_flags are now called SB_*, with the names
      and the values for the moment mirroring the MS_* flags that they're
      equivalent to.
      
      In this patch, just the headers are altered and some kernel code where
      blind automated conversion isn't necessarily correct.
      
      Note that this shows up some interesting issues:
      
       (1) Some MS_* flags get translated to MNT_* flags (such as MS_NODEV ->
           MNT_NODEV) without passing this on to the filesystem, but some
           filesystems set such flags anyway.
      
       (2) The ->remount_fs() methods of some filesystems adjust the *flags
           argument by setting MS_* flags in it, such as MS_NOATIME - but these
           flags are then scrubbed by do_remount_sb() (only the occupants of
           MS_RMT_MASK are permitted: MS_RDONLY, MS_SYNCHRONOUS, MS_MANDLOCK,
           MS_I_VERSION and MS_LAZYTIME)
      
      I'm not sure what's the best way to solve all these cases.
      Suggested-by: default avatarAl Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      e462ec50
    • David Howells's avatar
      VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb) · bc98a42c
      David Howells authored
      Firstly by applying the following with coccinelle's spatch:
      
      	@@ expression SB; @@
      	-SB->s_flags & MS_RDONLY
      	+sb_rdonly(SB)
      
      to effect the conversion to sb_rdonly(sb), then by applying:
      
      	@@ expression A, SB; @@
      	(
      	-(!sb_rdonly(SB)) && A
      	+!sb_rdonly(SB) && A
      	|
      	-A != (sb_rdonly(SB))
      	+A != sb_rdonly(SB)
      	|
      	-A == (sb_rdonly(SB))
      	+A == sb_rdonly(SB)
      	|
      	-!(sb_rdonly(SB))
      	+!sb_rdonly(SB)
      	|
      	-A && (sb_rdonly(SB))
      	+A && sb_rdonly(SB)
      	|
      	-A || (sb_rdonly(SB))
      	+A || sb_rdonly(SB)
      	|
      	-(sb_rdonly(SB)) != A
      	+sb_rdonly(SB) != A
      	|
      	-(sb_rdonly(SB)) == A
      	+sb_rdonly(SB) == A
      	|
      	-(sb_rdonly(SB)) && A
      	+sb_rdonly(SB) && A
      	|
      	-(sb_rdonly(SB)) || A
      	+sb_rdonly(SB) || A
      	)
      
      	@@ expression A, B, SB; @@
      	(
      	-(sb_rdonly(SB)) ? 1 : 0
      	+sb_rdonly(SB)
      	|
      	-(sb_rdonly(SB)) ? A : B
      	+sb_rdonly(SB) ? A : B
      	)
      
      to remove left over excess bracketage and finally by applying:
      
      	@@ expression A, SB; @@
      	(
      	-(A & MS_RDONLY) != sb_rdonly(SB)
      	+(bool)(A & MS_RDONLY) != sb_rdonly(SB)
      	|
      	-(A & MS_RDONLY) == sb_rdonly(SB)
      	+(bool)(A & MS_RDONLY) == sb_rdonly(SB)
      	)
      
      to make comparisons against the result of sb_rdonly() (which is a bool)
      work correctly.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      bc98a42c
  18. 13 Dec, 2016 1 commit
  19. 26 Jun, 2015 1 commit
  20. 05 May, 2015 1 commit
  21. 15 Apr, 2015 2 commits
  22. 17 Dec, 2014 1 commit
    • Miklos Szeredi's avatar
      init: fix read-write root mount · 10975933
      Miklos Szeredi authored
      If mount flags don't have MS_RDONLY, iso9660 returns EACCES without actually
      checking if it's an iso image.
      
      This tricks mount_block_root() into retrying with MS_RDONLY.  This results
      in a read-only root despite the "rw" boot parameter if the actual
      filesystem was checked after iso9660.
      
      I believe the behavior of iso9660 is okay, while that of mount_block_root()
      is not.  It should rather try all types without MS_RDONLY and only then
      retry with MS_RDONLY.
      
      This change also makes the code more robust against the case when EACCES is
      returned despite MS_RDONLY, which would've resulted in a lockup.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      10975933
  23. 17 Sep, 2014 1 commit
    • Paul Gortmaker's avatar
      Revert "init: make rootdelay=N consistent with rootwait behaviour" · 8ba4caf1
      Paul Gortmaker authored
      This reverts commit 4dfe694f.
      
      In that, we did:
      
        Here we move the rootdelay code to be right beside the rootwait code, so
        that their behaviour is consistent.
      
      ...which is fine, but in hindsight, perhaps moving the rootwait to be
      beside the rootdelay would have been better.  We also indicated:
      
        It should be noted that in doing so, the actions based on the
        saved_root_name[0] and initrd_load() were previously put on hold by
        rootdelay=N and now currently will not be delayed.  However, I think
        consistent behaviour is more important than matching historical behaviour
        of delaying the above two operations.
      
      But Pavel reported an instance where an ARM target with root on MMC
      was failing to mount root, and Russell diagnosed it to the fact that
      the call to set ROOT_DEV within the saved_root_name[0] processing
      block mentioned above was no longer being delayed.
      
      Rather than moving both wait clauses to the original position of
      rootdelay and risking unearthing other possible corner case breakage
      at this point in time, we simply revert now and we can revisit
      trying the alternate/earlier location in another development cycle.
      
      Cc: Pavel Machek <pavel@denx.de>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8ba4caf1
  24. 28 Aug, 2014 1 commit
  25. 08 Aug, 2014 1 commit
    • Paul Gortmaker's avatar
      init: make rootdelay=N consistent with rootwait behaviour · 4dfe694f
      Paul Gortmaker authored
      Currently rootdelay=N and rootwait behave differently (aside from the
      obvious unbounded wait duration) because they are at different places in
      the init sequence.
      
      The difference manifests itself for md devices because the call to
      md_run_setup() lives between rootdelay and rootwait, so if you try to use
      rootdelay=20 to try and allow a slow RAID0 array to assemble, you get
      this:
      
      [    4.526011] sd 6:0:0:0: [sdc] Attached SCSI removable disk
      [   22.972079] md: Waiting for all devices to be available before autodetect
      
      i.e.  you've achieved nothing other than delaying the probing 20s, when
      what you wanted was a 20s delay _after_ the probing for md devices was
      initiated.
      
      Here we move the rootdelay code to be right beside the rootwait code, so
      that their behaviour is consistent.
      
      It should be noted that in doing so, the actions based on the
      saved_root_name[0] and initrd_load() were previously put on hold by
      rootdelay=N and now currently will not be delayed.  However, I think
      consistent behaviour is more important than matching historical behaviour
      of delaying the above two operations.
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4dfe694f
  26. 03 Apr, 2014 1 commit