1. 13 12月, 2016 6 次提交
  2. 03 10月, 2016 2 次提交
  3. 30 7月, 2016 1 次提交
  4. 18 5月, 2016 1 次提交
  5. 11 4月, 2016 1 次提交
  6. 05 4月, 2016 1 次提交
    • K
      mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros · 09cbfeaf
      Kirill A. Shutemov 提交于
      PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
      ago with promise that one day it will be possible to implement page
      cache with bigger chunks than PAGE_SIZE.
      
      This promise never materialized.  And unlikely will.
      
      We have many places where PAGE_CACHE_SIZE assumed to be equal to
      PAGE_SIZE.  And it's constant source of confusion on whether
      PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
      especially on the border between fs and mm.
      
      Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
      breakage to be doable.
      
      Let's stop pretending that pages in page cache are special.  They are
      not.
      
      The changes are pretty straight-forward:
      
       - <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
      
       - <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
      
       - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};
      
       - page_cache_get() -> get_page();
      
       - page_cache_release() -> put_page();
      
      This patch contains automated changes generated with coccinelle using
      script below.  For some reason, coccinelle doesn't patch header files.
      I've called spatch for them manually.
      
      The only adjustment after coccinelle is revert of changes to
      PAGE_CAHCE_ALIGN definition: we are going to drop it later.
      
      There are few places in the code where coccinelle didn't reach.  I'll
      fix them manually in a separate patch.  Comments and documentation also
      will be addressed with the separate patch.
      
      virtual patch
      
      @@
      expression E;
      @@
      - E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
      + E
      
      @@
      expression E;
      @@
      - E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
      + E
      
      @@
      @@
      - PAGE_CACHE_SHIFT
      + PAGE_SHIFT
      
      @@
      @@
      - PAGE_CACHE_SIZE
      + PAGE_SIZE
      
      @@
      @@
      - PAGE_CACHE_MASK
      + PAGE_MASK
      
      @@
      expression E;
      @@
      - PAGE_CACHE_ALIGN(E)
      + PAGE_ALIGN(E)
      
      @@
      expression E;
      @@
      - page_cache_get(E)
      + get_page(E)
      
      @@
      expression E;
      @@
      - page_cache_release(E)
      + put_page(E)
      Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      09cbfeaf
  7. 21 3月, 2016 1 次提交
    • J
      ubifs: Add logging functions for ubifs_msg, ubifs_err and ubifs_warn · 3e7f2c51
      Joe Perches 提交于
      The existing logging macros are fairly large and converting the
      macros to functions make the object code smaller.
      
      Use %pV and __builtin_return_address(0) as appropriate.
      
      $ size fs/ubifs/built-in.o*
         text	   data	    bss	    dec	    hex	filename
       575831	 309688	 161312	1046831	  ff92f	fs/ubifs/built-in.o.allyesconfig.new
       622457	 312872	 161120	1096449	 10bb01	fs/ubifs/built-in.o.allyesconfig.old
       223785	    640	    644	 225069	  36f2d	fs/ubifs/built-in.o.defconfig.new
       251873	    640	    644	 253157	  3dce5	fs/ubifs/built-in.o.defconfig.old
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      3e7f2c51
  8. 14 11月, 2015 1 次提交
  9. 07 11月, 2015 1 次提交
    • D
      ubifs: introduce UBIFS_ATIME_SUPPORT to ubifs · 8c1c5f26
      Dongsheng Yang 提交于
      To make ubifs support atime flexily, this commit introduces
      a Kconfig option named as UBIFS_ATIME_SUPPORT.
      
      With UBIFS_ATIME_SUPPORT=n:
      	ubifs keeps the full compatibility to no_atime from
      the start of ubifs.
      
      =================UBIFS_ATIME_SUPPORT=n=======================
      -o - no atime
      -o atime - no atime
      -o noatime - no atime
      -o relatime - no atime
      -o strictatime - no atime
      -o lazyatime - no atime
      
      With UBIFS_ATIME_SUPPORT=y:
      	ubifs supports the atime same with other main stream
      file systems.
      =================UBIFS_ATIME_SUPPORT=y=======================
      -o - default behavior (relatime currently)
      -o atime - atime support
      -o noatime - no atime support
      -o relatime - relative atime support
      -o strictatime - strict atime support
      -o lazyatime - lazy atime support
      Signed-off-by: NDongsheng Yang <yangds.fnst@cn.fujitsu.com>
      Reviewed-by: NRichard Weinberger <richard@nod.at>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      8c1c5f26
  10. 04 10月, 2015 1 次提交
  11. 25 3月, 2015 2 次提交
    • S
      UBIFS: extend debug/message capabilities · 235c362b
      Sheng Yong 提交于
      In the case where we have more than one volumes on different UBI
      devices, it may be not that easy to tell which volume prints the
      messages.  Add ubi number and volume id in ubifs_msg/warn/error
      to help debug. These two values are passed by struct ubifs_info.
      
      For those where ubifs_info is not initialized yet, ubifs_* is
      replaced by pr_*. For those where ubifs_info is not avaliable,
      ubifs_info is passed to the calling function as a const parameter.
      
      The output looks like,
      
      [   95.444879] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 696
      [   95.484688] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "test1"
      [   95.484694] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
      [   95.484699] UBIFS (ubi0:1): FS size: 30220288 bytes (28 MiB, 238 LEBs), journal size 1523712 bytes (1 MiB, 12 LEBs)
      [   95.484703] UBIFS (ubi0:1): reserved for root: 1427378 bytes (1393 KiB)
      [   95.484709] UBIFS (ubi0:1): media format: w4/r0 (latest is w4/r0), UUID 40DFFC0E-70BE-4193-8905-F7D6DFE60B17, small LPT model
      [   95.489875] UBIFS (ubi1:0): background thread "ubifs_bgt1_0" started, PID 699
      [   95.529713] UBIFS (ubi1:0): UBIFS: mounted UBI device 1, volume 0, name "test2"
      [   95.529718] UBIFS (ubi1:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
      [   95.529724] UBIFS (ubi1:0): FS size: 19808256 bytes (18 MiB, 156 LEBs), journal size 1015809 bytes (0 MiB, 8 LEBs)
      [   95.529727] UBIFS (ubi1:0): reserved for root: 935592 bytes (913 KiB)
      [   95.529733] UBIFS (ubi1:0): media format: w4/r0 (latest is w4/r0), UUID EEB7779D-F419-4CA9-811B-831CAC7233D4, small LPT model
      
      [  954.264767] UBIFS error (ubi1:0 pid 756): ubifs_read_node: bad node type (255 but expected 6)
      [  954.367030] UBIFS error (ubi1:0 pid 756): ubifs_read_node: bad node at LEB 0:0, LEB mapping status 1
      Signed-off-by: NSheng Yong <shengyong1@huawei.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      235c362b
    • Y
      UBIFS: Fix trivial typos in comments · d3f9db00
      Yannick Guerrini 提交于
      Change 'comress' to 'compress'
      Change 'inteval' to 'interval'
      Change 'disabe' to 'disable'
      Change 'nenver' to 'never'
      Signed-off-by: NYannick Guerrini <yguerrini@tomshardware.fr>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      d3f9db00
  12. 28 1月, 2015 1 次提交
  13. 19 7月, 2014 2 次提交
  14. 02 6月, 2014 1 次提交
  15. 11 9月, 2013 1 次提交
    • D
      fs: convert fs shrinkers to new scan/count API · 1ab6c499
      Dave Chinner 提交于
      Convert the filesystem shrinkers to use the new API, and standardise some
      of the behaviours of the shrinkers at the same time.  For example,
      nr_to_scan means the number of objects to scan, not the number of objects
      to free.
      
      I refactored the CIFS idmap shrinker a little - it really needs to be
      broken up into a shrinker per tree and keep an item count with the tree
      root so that we don't need to walk the tree every time the shrinker needs
      to count the number of objects in the tree (i.e.  all the time under
      memory pressure).
      
      [glommer@openvz.org: fixes for ext4, ubifs, nfs, cifs and glock. Fixes are needed mainly due to new code merged in the tree]
      [assorted fixes folded in]
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NGlauber Costa <glommer@openvz.org>
      Acked-by: NMel Gorman <mgorman@suse.de>
      Acked-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Acked-by: NJan Kara <jack@suse.cz>
      Acked-by: NSteven Whitehouse <swhiteho@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Cc: Arve Hjønnevåg <arve@android.com>
      Cc: Carlos Maiolino <cmaiolino@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chuck Lever <chuck.lever@oracle.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Gleb Natapov <gleb@redhat.com>
      Cc: Greg Thelen <gthelen@google.com>
      Cc: J. Bruce Fields <bfields@redhat.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Jerome Glisse <jglisse@redhat.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Kent Overstreet <koverstreet@google.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      1ab6c499
  16. 04 2月, 2013 2 次提交
  17. 26 10月, 2012 1 次提交
  18. 21 9月, 2012 1 次提交
  19. 31 8月, 2012 1 次提交
  20. 21 5月, 2012 1 次提交
  21. 17 5月, 2012 1 次提交
  22. 01 3月, 2012 1 次提交
  23. 04 1月, 2012 1 次提交
  24. 21 7月, 2011 1 次提交
    • J
      fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers · 02c24a82
      Josef Bacik 提交于
      Btrfs needs to be able to control how filemap_write_and_wait_range() is called
      in fsync to make it less of a painful operation, so push down taking i_mutex and
      the calling of filemap_write_and_wait() down into the ->fsync() handlers.  Some
      file systems can drop taking the i_mutex altogether it seems, like ext3 and
      ocfs2.  For correctness sake I just pushed everything down in all cases to make
      sure that we keep the current behavior the same for everybody, and then each
      individual fs maintainer can make up their mind about what to do from there.
      Thanks,
      Acked-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NJosef Bacik <josef@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      02c24a82
  25. 04 7月, 2011 2 次提交
    • A
      UBIFS: introduce more I/O helpers · 83cef708
      Artem Bityutskiy 提交于
      Introduce the following I/O helper functions: 'ubifs_leb_read()',
      'ubifs_leb_write()', 'ubifs_leb_change()', 'ubifs_leb_unmap()',
      'ubifs_leb_map()', 'ubifs_is_mapped().
      
      The idea is to wrap all UBI I/O functions in order to encapsulate various
      assertions and error path handling (error message, stack dump, switching to R/O
      mode). And there are some other benefits of this which will be used in the
      following patches.
      
      This patch does not switch whole UBIFS to use these functions yet.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      83cef708
    • A
      UBIFS: use correct flags in lprops · 37662447
      Artem Bityutskiy 提交于
      The UBIFS lpt tree is in many aspects similar to the TNC tree, and we have
      similar flags for these trees. And by mistake we use the COW_ZNODE flag for
      LPT in some places, instead of the right flag COW_CNODE. And this works
      only because these two constants have the same value.
      
      This patch makes all the LPT code to use COW_CNODE and also changes COW_CNODE
      constant value to make sure we do not misuse the flags any more.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      37662447
  26. 01 6月, 2011 2 次提交
  27. 30 5月, 2011 1 次提交
  28. 16 5月, 2011 2 次提交
    • M
      UBIFS: add the fixup function · 6554a657
      Matthew L. Creech 提交于
      This patch adds the 'ubifs_fixup_free_space()' function which scans all
      LEBs in the filesystem for those that are in-use but have one or more
      empty pages, then re-maps the LEBs in order to erase the empty portions.
      Afterward it removes the "space_fixup" flag from the UBIFS superblock.
      
      Artem: massaged the patch
      Signed-off-by: NMatthew L. Creech <mlcreech@gmail.com>
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      6554a657
    • M
      UBIFS: add a superblock flag for free space fix-up · 9f58d350
      Matthew L. Creech 提交于
      The 'space_fixup' flag can be set in the superblock of a new filesystem by
      mkfs.ubifs to indicate that any eraseblocks with free space remaining should be
      fixed-up the first time it's mounted (after which the flag is un-set). This
      means that the UBIFS image has been flashed by a "dumb" flasher and the free
      space has been actually programmed (writing all 0xFFs), so this free space
      cannot be used. UBIFS fixes the free space up by re-writing the contents of all
      LEBs with free space using the atomic LEB change UBI operation.
      
      Artem: improved commit message, add some more commentaries to the code.
      Signed-off-by: NMatthew L. Creech <mlcreech@gmail.com>
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      9f58d350