1. 27 Nov, 2017 1 commit
    • Linus Torvalds's avatar
      Rename superblock flags (MS_xyz -> SB_xyz) · 1751e8a6
      Linus Torvalds authored
      This is a pure automated search-and-replace of the internal kernel
      superblock flags.
      
      The s_flags are now called SB_*, with the names and the values for the
      moment mirroring the MS_* flags that they're equivalent to.
      
      Note how the MS_xyz flags are the ones passed to the mount system call,
      while the SB_xyz flags are what we then use in sb->s_flags.
      
      The script to do this was:
      
          # places to look in; re security/*: it generally should *not* be
          # touched (that stuff parses mount(2) arguments directly), but
          # there are two places where we really deal with superblock flags.
          FILES="drivers/mtd drivers/staging/lustre fs ipc mm \
                  include/linux/fs.h include/uapi/linux/bfs_fs.h \
                  security/apparmor/apparmorfs.c security/apparmor/include/lib.h"
          # the list of MS_... constants
          SYMS="RDONLY NOSUID NODEV NOEXEC SYNCHRONOUS REMOUNT MANDLOCK \
                DIRSYNC NOATIME NODIRATIME BIND MOVE REC VERBOSE SILENT \
                POSIXACL UNBINDABLE PRIVATE SLAVE SHARED RELATIME KERNMOUNT \
                I_VERSION STRICTATIME LAZYTIME SUBMOUNT NOREMOTELOCK NOSEC BORN \
                ACTIVE NOUSER"
      
          SED_PROG=
          for i in $SYMS; do SED_PROG="$SED_PROG -e s/MS_$i/SB_$i/g"; done
      
          # we want files that contain at least one of MS_...,
          # with fs/namespace.c and fs/pnode.c excluded.
          L=$(for i in $SYMS; do git grep -w -l MS_$i $FILES; done| sort|uniq|grep -v '^fs/namespace.c'|grep -v '^fs/pnode.c')
      
          for f in $L; do sed -i $f $SED_PROG; done
      Requested-by: 's avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: 's avatarLinus Torvalds <torvalds@linux-foundation.org>
      1751e8a6
  2. 17 Jul, 2017 1 commit
    • 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: 's avatarDavid Howells <dhowells@redhat.com>
      bc98a42c
  3. 21 Jan, 2016 1 commit
  4. 17 Apr, 2015 1 commit
  5. 05 Oct, 2012 2 commits
  6. 01 Jun, 2012 3 commits
    • Artem Bityutskiy's avatar
      fat: switch to fsinfo_inode · 78491189
      Artem Bityutskiy authored
      Currently FAT file-system maps the VFS "superblock" abstraction to the
      FSINFO block.  The FSINFO block contains non-essential data about the
      amount of free clusters and the next free cluster.  FAT file-system can
      always find out this information by scanning the FAT table, but having it
      in the FSINFO block may speed things up sometimes.  So FAT file-system
      relies on the VFS superblock write-out services to make sure the FSINFO
      block is written out to the media from time to time.
      
      The whole "superblock write-out" VFS infrastructure is served by the
      'sync_supers()' kernel thread, which wakes up every 5 (by default) seconds
      and writes out all dirty superblock using the '->write_super()' call-back.
       But the problem with this thread is that it wastes power by waking up the
      system every 5 seconds no matter what.  So we want to kill it completely
      and thus, we need to make file-systems to stop using the '->write_super'
      VFS service, and then remove it together with the kernel thread.
      
      This patch switches the FAT FSINFO block management from
      '->write_super()'/'->s_dirt' to 'fsinfo_inode'/'->write_inode'.  Now,
      instead of setting the 's_dirt' flag, we just mark the special
      'fsinfo_inode' inode as dirty and let VFS invoke the '->write_inode'
      call-back when needed, where we write-out the FSINFO block.
      
      This patch also makes sure we do not mark the 'fsinfo_inode' inode as
      dirty if we are not FAT32 (FAT16 and FAT12 do not have the FSINFO block)
      or if we are in R/O mode.
      
      As a bonus, we can also remove the '->sync_fs()' and '->write_super()' FAT
      call-back function because they become unneeded.
      Signed-off-by: 's avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: 's avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: 's avatarLinus Torvalds <torvalds@linux-foundation.org>
      78491189
    • Artem Bityutskiy's avatar
      fat: mark superblock as dirty less often · 330fe3c4
      Artem Bityutskiy authored
      Preparation for further changes.  It touches few functions in fatent.c and
      prevents them from marking the superblock as dirty unnecessarily often.
      Namely, instead of marking it as dirty in the internal tight loops - do it
      only once at the end of the functions.  And instead of marking it as dirty
      while holding the FAT table lock, do it outside the lock.
      
      The reason for this patch is that marking the superblock as dirty will
      soon become a little bit heavier operation, so it is cleaner to do this
      only when it is necessary.
      Signed-off-by: 's avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: 's avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: 's avatarLinus Torvalds <torvalds@linux-foundation.org>
      330fe3c4
    • Artem Bityutskiy's avatar
      fat: introduce mark_fsinfo_dirty helper · 90b43665
      Artem Bityutskiy authored
      A preparation patch which introduces a 'mark_fsinfo_dirty()' helper
      function which just sets the 's_dirt' flag to 1 so far.  I'll add more
      code to this helper later, so I do not mark it as 'inline'.
      Signed-off-by: 's avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: 's avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: 's avatarLinus Torvalds <torvalds@linux-foundation.org>
      90b43665
  7. 12 Apr, 2011 1 commit
  8. 16 Sep, 2010 1 commit
    • Christoph Hellwig's avatar
      block: remove BLKDEV_IFL_WAIT · dd3932ed
      Christoph Hellwig authored
      All the blkdev_issue_* helpers can only sanely be used for synchronous
      caller.  To issue cache flushes or barriers asynchronously the caller needs
      to set up a bio by itself with a completion callback to move the asynchronous
      state machine ahead.  So drop the BLKDEV_IFL_WAIT flag that is always
      specified when calling blkdev_issue_* and also remove the now unused flags
      argument to blkdev_issue_flush and blkdev_issue_zeroout.  For
      blkdev_issue_discard we need to keep it for the secure discard flag, which
      gains a more descriptive name and loses the bitops vs flag confusion.
      Signed-off-by: 's avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: 's avatarJens Axboe <jaxboe@fusionio.com>
      dd3932ed
  9. 10 Sep, 2010 2 commits
  10. 21 Nov, 2009 1 commit
  11. 12 Jun, 2009 1 commit
  12. 03 Jun, 2009 1 commit
  13. 06 Nov, 2008 3 commits
  14. 09 Oct, 2008 1 commit
  15. 30 Apr, 2008 1 commit
  16. 28 Apr, 2008 2 commits
  17. 09 Jan, 2008 1 commit
  18. 16 Jul, 2007 1 commit
  19. 23 Mar, 2006 1 commit
  20. 09 Jan, 2006 2 commits
  21. 16 Apr, 2005 1 commit
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4