1. 09 2月, 2016 1 次提交
  2. 23 1月, 2016 1 次提交
  3. 15 1月, 2016 1 次提交
    • V
      kmemcg: account certain kmem allocations to memcg · 5d097056
      Vladimir Davydov 提交于
      Mark those kmem allocations that are known to be easily triggered from
      userspace as __GFP_ACCOUNT/SLAB_ACCOUNT, which makes them accounted to
      memcg.  For the list, see below:
      
       - threadinfo
       - task_struct
       - task_delay_info
       - pid
       - cred
       - mm_struct
       - vm_area_struct and vm_region (nommu)
       - anon_vma and anon_vma_chain
       - signal_struct
       - sighand_struct
       - fs_struct
       - files_struct
       - fdtable and fdtable->full_fds_bits
       - dentry and external_name
       - inode for all filesystems. This is the most tedious part, because
         most filesystems overwrite the alloc_inode method.
      
      The list is far from complete, so feel free to add more objects.
      Nevertheless, it should be close to "account everything" approach and
      keep most workloads within bounds.  Malevolent users will be able to
      breach the limit, but this was possible even with the former "account
      everything" approach (simply because it did not account everything in
      fact).
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NVladimir Davydov <vdavydov@virtuozzo.com>
      Acked-by: NJohannes Weiner <hannes@cmpxchg.org>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Greg Thelen <gthelen@google.com>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5d097056
  4. 15 12月, 2015 1 次提交
  5. 20 8月, 2015 1 次提交
    • J
      udf: Don't modify filesystem for read-only mounts · 9181f8bf
      Jan Kara 提交于
      When read-write mount of a filesystem is requested but we find out we
      can mount the filesystem only in read-only mode, we still modify
      LVID in udf_close_lvid(). That is both unnecessary and contrary to
      expectation that when we fall back to read-only mount we don't modify
      the filesystem.
      
      Make sure we call udf_close_lvid() only if we called udf_open_lvid() so
      that filesystem gets modified only if we verified we are allowed to
      write to it.
      Reported-by: NKarel Zak <kzak@redhat.com>
      Signed-off-by: NJan Kara <jack@suse.com>
      9181f8bf
  6. 21 5月, 2015 1 次提交
  7. 18 5月, 2015 1 次提交
  8. 14 3月, 2015 1 次提交
  9. 05 2月, 2015 1 次提交
  10. 12 1月, 2015 1 次提交
  11. 20 11月, 2014 2 次提交
  12. 09 10月, 2014 1 次提交
    • J
      udf: Fix loading of special inodes · 6174c2eb
      Jan Kara 提交于
      Some UDF media have special inodes (like VAT or metadata partition
      inodes) whose link_count is 0. Thus commit 4071b913 (udf: Properly
      detect stale inodes) broke loading these inodes because udf_iget()
      started returning -ESTALE for them. Since we still need to properly
      detect stale inodes queried by NFS, create two variants of udf_iget() -
      one which is used for looking up special inodes (which ignores
      link_count == 0) and one which is used for other cases which return
      ESTALE when link_count == 0.
      
      Fixes: 4071b913
      CC: stable@vger.kernel.org
      Signed-off-by: NJan Kara <jack@suse.cz>
      6174c2eb
  13. 05 9月, 2014 1 次提交
    • J
      udf: Make udf_read_inode() and udf_iget() return error · 6d3d5e86
      Jan Kara 提交于
      Currently __udf_read_inode() wasn't returning anything and we found out
      whether we succeeded reading inode by checking whether inode is bad or
      not. udf_iget() returned NULL on failure and inode pointer otherwise.
      Make these two functions properly propagate errors up the call stack and
      use the return value in callers.
      Signed-off-by: NJan Kara <jack@suse.cz>
      6d3d5e86
  14. 16 7月, 2014 1 次提交
  15. 13 3月, 2014 1 次提交
    • T
      fs: push sync_filesystem() down to the file system's remount_fs() · 02b9984d
      Theodore Ts'o 提交于
      Previously, the no-op "mount -o mount /dev/xxx" operation when the
      file system is already mounted read-write causes an implied,
      unconditional syncfs().  This seems pretty stupid, and it's certainly
      documented or guaraunteed to do this, nor is it particularly useful,
      except in the case where the file system was mounted rw and is getting
      remounted read-only.
      
      However, it's possible that there might be some file systems that are
      actually depending on this behavior.  In most file systems, it's
      probably fine to only call sync_filesystem() when transitioning from
      read-write to read-only, and there are some file systems where this is
      not needed at all (for example, for a pseudo-filesystem or something
      like romfs).
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Cc: linux-fsdevel@vger.kernel.org
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Artem Bityutskiy <dedekind1@gmail.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Evgeniy Dushistov <dushistov@mail.ru>
      Cc: Jan Kara <jack@suse.cz>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Anders Larsen <al@alarsen.net>
      Cc: Phillip Lougher <phillip@squashfs.org.uk>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
      Cc: Petr Vandrovec <petr@vandrovec.name>
      Cc: xfs@oss.sgi.com
      Cc: linux-btrfs@vger.kernel.org
      Cc: linux-cifs@vger.kernel.org
      Cc: samba-technical@lists.samba.org
      Cc: codalist@coda.cs.cmu.edu
      Cc: linux-ext4@vger.kernel.org
      Cc: linux-f2fs-devel@lists.sourceforge.net
      Cc: fuse-devel@lists.sourceforge.net
      Cc: cluster-devel@redhat.com
      Cc: linux-mtd@lists.infradead.org
      Cc: jfs-discussion@lists.sourceforge.net
      Cc: linux-nfs@vger.kernel.org
      Cc: linux-nilfs@vger.kernel.org
      Cc: linux-ntfs-dev@lists.sourceforge.net
      Cc: ocfs2-devel@oss.oracle.com
      Cc: reiserfs-devel@vger.kernel.org
      02b9984d
  16. 03 3月, 2014 2 次提交
  17. 19 10月, 2013 1 次提交
    • P
      udf: fix for pathetic mount times in case of invalid file system · 44499602
      Peter A. Felvegi 提交于
      The UDF driver was not strict enough about checking the IDs in the
      VSDs when mounting, which resulted in reading through all the sectors
      of the block device in some unfortunate cases. Eg, trying to mount my
      uninitialized 200G SSD partition (all 0xFF bytes) took ~350 minutes to
      fail, because the code expected some of the valid IDs or a zero byte.
      During this, the mount couldn't be killed, sync from the cmdline
      blocked, and the machine froze into the shutdown. Valid filesystems
      (extX, btrfs, ntfs) were rejected by the mere accident of having a
      zero byte at just the right place in some of their sectors, close
      enough to the beginning not to generate excess I/O. The fix adds a
      hard limit on the VSD sector offset, adds the two missing VSD IDs, and
      stops scanning when encountering an invalid ID. Also replaced the
      magic number 32768 with a more meaningful #define, and supressed the
      bogus message about failing to read the first sector if no UDF fs was
      detected.
      Signed-off-by: NPeter A. Felvegi <petschy@gmail.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      44499602
  18. 24 9月, 2013 1 次提交
    • J
      udf: Fortify LVID loading · 69d75671
      Jan Kara 提交于
      A user has reported an oops in udf_statfs() that was caused by
      numOfPartitions entry in LVID structure being corrupted. Fix the problem
      by verifying whether numOfPartitions makes sense at least to the extent
      that LVID fits into a single block as it should.
      Reported-by: NJuergen Weigert <jw@suse.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      69d75671
  19. 01 8月, 2013 2 次提交
    • J
      udf: Refuse RW mount of the filesystem instead of making it RO · e729eac6
      Jan Kara 提交于
      Refuse RW mount of udf filesystem. So far we just silently changed it
      to RO mount but when the media is writeable, block layer won't notice
      this change and thus will think device is used RW and will block eject
      button of the drive. That is unexpected by users because for
      non-writeable media eject button works just fine.
      
      Userspace mount(8) command handles this just fine and retries mounting
      with MS_RDONLY set so userspace shouldn't see any regression.  Plus any
      tool mounting udf is likely confronted with the case of read-only
      media where block layer already refuses to mount the filesystem without
      MS_RDONLY set so our behavior shouldn't be anything new for it.
      Reported-by: NHui Wang <hui.wang@canonical.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      e729eac6
    • J
      udf: Standardize return values in mount sequence · d759bfa4
      Jan Kara 提交于
      Change all function used in filesystem discovery during mount to user
      standard kernel return values - -errno on error, 0 on success instead
      of 1 on failure and 0 on success. This allows us to pass error number
      (not just failure / success) so we can abort device scanning earlier
      in case of errors like EIO or ENOMEM . Also we will be able to return
      EROFS in case writeable mount is requested but writing isn't supported.
      Signed-off-by: NJan Kara <jack@suse.cz>
      d759bfa4
  20. 11 3月, 2013 1 次提交
  21. 06 2月, 2013 2 次提交
  22. 22 1月, 2013 1 次提交
    • N
      udf: add extent cache support in case of file reading · 99600051
      Namjae Jeon 提交于
      This patch implements extent caching in case of file reading.
      While reading a file, currently, UDF reads metadata serially
      which takes a lot of time depending on the number of extents present
      in the file. Caching last accessd extent improves metadata read time.
      Instead of reading file metadata from start, now we read from
      the cached extent.
      
      This patch considerably improves the time spent by CPU in kernel mode.
      For example, while reading a 10.9 GB file using dd:
      Time before applying patch:
      11677022208 bytes (10.9GB) copied, 1529.748921 seconds, 7.3MB/s
      real    25m 29.85s
      user    0m 12.41s
      sys     15m 34.75s
      
      Time after applying patch:
      11677022208 bytes (10.9GB) copied, 1469.338231 seconds, 7.6MB/s
      real    24m 29.44s
      user    0m 15.73s
      sys     3m 27.61s
      
      [JK: Fix bh refcounting issues, simplify initialization]
      Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com>
      Signed-off-by: NAshish Sangwan <a.sangwan@samsung.com>
      Signed-off-by: NBonggil Bak <bgbak@samsung.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      99600051
  23. 21 1月, 2013 1 次提交
  24. 15 1月, 2013 1 次提交
  25. 03 10月, 2012 1 次提交
  26. 21 9月, 2012 1 次提交
  27. 15 8月, 2012 2 次提交
  28. 11 7月, 2012 1 次提交
  29. 09 7月, 2012 2 次提交
  30. 29 6月, 2012 3 次提交
  31. 21 3月, 2012 2 次提交