1. 18 12月, 2017 1 次提交
    • T
      ext4: fix up remaining files with SPDX cleanups · f5166768
      Theodore Ts'o 提交于
      A number of ext4 source files were skipped due because their copyright
      permission statements didn't match the expected text used by the
      automated conversion utilities.  I've added SPDX tags for the rest.
      
      While looking at some of these files, I've noticed that we have quite
      a bit of variation on the licenses that were used --- in particular
      some of the Red Hat licenses on the jbd2 files use a GPL2+ license,
      and we have some files that have a LGPL-2.1 license (which was quite
      surprising).
      
      I've not attempted to do any license changes.  Even if it is perfectly
      legal to relicense to GPL 2.0-only for consistency's sake, that should
      be done with ext4 developer community discussion.
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      
      f5166768
  2. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  3. 23 6月, 2017 1 次提交
    • D
      ext4: send parallel discards on commit completions · a0154344
      Daeho Jeong 提交于
      Now, when we mount ext4 filesystem with '-o discard' option, we have to
      issue all the discard commands for the blocks to be deallocated and
      wait for the completion of the commands on the commit complete phase.
      Because this procedure might involve a lot of sequential combinations of
      issuing discard commands and waiting for that, the delay of this
      procedure might be too much long, even to 17.0s in our test,
      and it results in long commit delay and fsync() performance degradation.
      
      To reduce this kind of delay, instead of adding callback for each
      extent and handling all of them in a sequential manner on commit phase,
      we instead add a separate list of extents to free to the superblock and
      then process this list at once after transaction commits so that
      we can issue all the discard commands in a parallel manner like XFS
      filesystem.
      
      Finally, we could enhance the discard command handling performance.
      The result was such that 17.0s delay of a single commit in the worst
      case has been enhanced to 4.8s.
      Signed-off-by: NDaeho Jeong <daeho.jeong@samsung.com>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      Tested-by: NHobin Woo <hobin.woo@samsung.com>
      Tested-by: NKitae Lee <kitae87.lee@samsung.com>
      Reviewed-by: NJan Kara <jack@suse.cz>
      a0154344
  4. 30 4月, 2017 1 次提交
  5. 15 10月, 2016 1 次提交
  6. 14 3月, 2016 1 次提交
  7. 21 2月, 2014 1 次提交
    • E
      ext4: remove unused ac_ex_scanned · dc9ddd98
      Eric Sandeen 提交于
      When looking at a bug report with:
      
      > kernel: EXT4-fs: 0 scanned, 0 found
      
      I thought wow, 0 scanned, that's odd?  But it's not odd; it's printing
      a variable that is initialized to 0 and never touched again.
      
      It's never been used since the original merge, so I don't really even
      know what the original intent was, either.
      
      If anyone knows how to hook it up, speak now via patch, otherwise just
      yank it so it's not making a confusing situation more confusing in
      kernel logs.
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      dc9ddd98
  8. 18 2月, 2014 1 次提交
    • P
      ext4: address a benign compiler warning · 024949ec
      Patrick Palka 提交于
      When !defined(CONFIG_EXT4_DEBUG), mb_debug() should be defined as a
      no_printk() statement instead of an empty statement in order to suppress
      the following compiler warning:
      
      fs/ext4/mballoc.c: In function ‘ext4_mb_cleanup_pa’:
      fs/ext4/mballoc.c:2659:47: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
         mb_debug(1, "mballoc: %u PAs left\n", count);
      Signed-off-by: NPatrick Palka <patrick@parcs.ath.cx>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      024949ec
  9. 10 2月, 2013 1 次提交
    • T
      ext4: use module parameters instead of debugfs for mballoc_debug · a0b30c12
      Theodore Ts'o 提交于
      There are multiple reasons to move away from debugfs.  First of all,
      we are only using it for a single parameter, and it is much more
      complicated to set up (some 30 lines of code compared to 3), and one
      more thing that might fail while loading the ext4 module.
      
      Secondly, as a module paramter it can be specified as a boot option if
      ext4 is built into the kernel, or as a parameter when the module is
      loaded, and it can also be manipulated dynamically under
      /sys/module/ext4/parameters/mballoc_debug.  So it is more flexible.
      
      Ultimately we want to move away from using mb_debug() towards
      tracepoints, but for now this is still a useful simplification of the
      code base.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      a0b30c12
  10. 17 8月, 2012 1 次提交
  11. 21 2月, 2012 2 次提交
  12. 01 11月, 2011 1 次提交
  13. 10 9月, 2011 3 次提交
    • T
      ext4: teach ext4_free_blocks() about bigalloc and clusters · 84130193
      Theodore Ts'o 提交于
      The ext4_free_blocks() function now has two new flags that indicate
      whether a partial cluster at the beginning or the end of the block
      extents should be freed or not.  That will be up the caller (i.e.,
      truncate), who can figure out whether partial clusters at the
      beginning or the end of a block range can be freed.
      
      We also have to update the ext4_mb_free_metadata() and
      release_blocks_on_commit() machinery to be cluster-based, since it is
      used by ext4_free_blocks().
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      84130193
    • T
      ext4: teach mballoc preallocation code about bigalloc clusters · 53accfa9
      Theodore Ts'o 提交于
      In most of mballoc.c, we do everything in units of clusters, since the
      block allocation bitmaps and buddy bitmaps are all denominated in
      clusters.  The one place where we do deal with absolute block numbers
      is in the code that handles the preallocation regions, since in the
      case of inode-based preallocation regions, the start of the
      preallocation region can't be relative to the beginning of the group.
      
      So this adds a bit of complexity, where pa_pstart and pa_lstart are
      block numbers, while pa_free, pa_len, and fe_len are denominated in
      units of clusters.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      53accfa9
    • T
      ext4: convert block group-relative offsets to use clusters · 3212a80a
      Theodore Ts'o 提交于
      Certain parts of the ext4 code base, primarily in mballoc.c, use a
      block group number and offset from the beginning of the block group.
      This offset is invariably used to index into the allocation bitmap, so
      change the offset to be denominated in units of clusters.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      3212a80a
  14. 24 7月, 2011 1 次提交
  15. 10 5月, 2011 1 次提交
  16. 25 2月, 2011 1 次提交
  17. 04 3月, 2010 2 次提交
  18. 14 12月, 2009 1 次提交
  19. 30 9月, 2009 2 次提交
    • T
      ext4: Use tracepoints for mb_history trace file · 296c355c
      Theodore Ts'o 提交于
      The /proc/fs/ext4/<dev>/mb_history was maintained manually, and had a
      number of problems: it required a largish amount of memory to be
      allocated for each ext4 filesystem, and the s_mb_history_lock
      introduced a CPU contention problem.  
      
      By ripping out the mb_history code and replacing it with ftrace
      tracepoints, and we get more functionality: timestamps, event
      filtering, the ability to correlate mballoc history with other ext4
      tracepoints, etc.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      296c355c
    • T
      ext4, jbd2: Drop unneeded printks at mount and unmount time · 90576c0b
      Theodore Ts'o 提交于
      There are a number of kernel printk's which are printed when an ext4
      filesystem is mounted and unmounted.  Disable them to economize space
      in the system logs.  In addition, disabling the mballoc stats by
      default saves a number of unneeded atomic operations for every block
      allocation or deallocation.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      90576c0b
  20. 26 8月, 2009 1 次提交
    • E
      ext4: use ext4_grpblk_t more extensively · a36b4498
      Eric Sandeen 提交于
      unsigned  short is potentially too small to track blocks within
      a group; today it is safe due to restrictions in e2fsprogs but
      we have _lo / _hi bits for group blocks with the intent to go
      up to 32 bits, so clean this up now.
      
      There are many more places where we use unsigned/int/unsigned int
      to contain a group block but this should at least fix all the
      short types.
      
      I added a few comments to the struct ext4_group_info definition
      as well.
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      a36b4498
  21. 19 9月, 2009 1 次提交
  22. 02 5月, 2009 1 次提交
  23. 17 6月, 2009 1 次提交
  24. 28 3月, 2009 1 次提交
  25. 07 2月, 2009 1 次提交
  26. 06 1月, 2009 2 次提交
  27. 26 11月, 2008 1 次提交
  28. 06 1月, 2009 1 次提交
  29. 17 10月, 2008 1 次提交
    • T
      ext4: Replace hackish ext4_mb_poll_new_transaction with commit callback · 3e624fc7
      Theodore Ts'o 提交于
      The multiblock allocator needs to be able to release blocks (and issue
      a blkdev discard request) when the transaction which freed those
      blocks is committed.  Previously this was done via a polling mechanism
      when blocks are allocated or freed.  A much better way of doing things
      is to create a jbd2 callback function and attaching the list of blocks
      to be freed directly to the transaction structure.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      3e624fc7
  30. 16 10月, 2008 2 次提交
  31. 23 9月, 2008 1 次提交
  32. 24 7月, 2008 1 次提交
    • A
      ext4: Don't allow lg prealloc list to be grow large. · 6be2ded1
      Aneesh Kumar K.V 提交于
      Currently, the locality group prealloc list is freed only when there
      is a block allocation failure. This can result in large number of
      entries in the preallocation list making ext4_mb_use_preallocated()
      expensive.
      
      To fix this, we convert the locality group prealloc list to a hash
      list. The hash index is the order of number of blocks in the prealloc
      space with a max order of 9. When adding prealloc space to the list we
      make sure total entries for each order does not exceed 8. If it is
      more than 8 we discard few entries and make sure the we have only <= 5
      entries.
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      6be2ded1
  33. 30 4月, 2008 1 次提交