1. 02 4月, 2018 12 次提交
  2. 26 2月, 2018 1 次提交
  3. 30 1月, 2018 1 次提交
  4. 13 11月, 2017 2 次提交
  5. 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
  6. 23 9月, 2017 1 次提交
  7. 20 9月, 2017 1 次提交
    • I
      libceph: don't allow bidirectional swap of pg-upmap-items · 29a0cfbf
      Ilya Dryomov 提交于
      This reverts most of commit f53b7665 ("libceph: upmap semantic
      changes").
      
      We need to prevent duplicates in the final result.  For example, we
      can currently take
      
        [1,2,3] and apply [(1,2)] and get [2,2,3]
      
      or
      
        [1,2,3] and apply [(3,2)] and get [1,2,2]
      
      The rest of the system is not prepared to handle duplicates in the
      result set like this.
      
      The reverted piece was intended to allow
      
        [1,2,3] and [(1,2),(2,1)] to get [2,1,3]
      
      to reorder primaries.  First, this bidirectional swap is hard to
      implement in a way that also prevents dups.  For example, [1,2,3] and
      [(1,4),(2,3),(3,4)] would give [4,3,4] but would we just drop the last
      step we'd have [4,3,3] which is also invalid, etc.  Simpler to just not
      handle bidirectional swaps.  In practice, they are not needed: if you
      just want to choose a different primary then use primary_affinity, or
      pg_upmap (not pg_upmap_items).
      
      Cc: stable@vger.kernel.org # 4.13
      Link: http://tracker.ceph.com/issues/21410Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      Reviewed-by: NSage Weil <sage@redhat.com>
      29a0cfbf
  8. 07 9月, 2017 2 次提交
  9. 01 8月, 2017 6 次提交
  10. 17 7月, 2017 5 次提交
  11. 07 7月, 2017 8 次提交
    • I
      libceph: osd_state is 32 bits wide in luminous · 0bb05da2
      Ilya Dryomov 提交于
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      0bb05da2
    • I
      crush: remove an obsolete comment · 9eebe45c
      Ilya Dryomov 提交于
      Reflects ceph.git commit dca1ae1e0a6b02029c3a7f9dec4114972be26d50.
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      9eebe45c
    • I
      crush: crush_init_workspace starts with struct crush_work · b88ed8d8
      Ilya Dryomov 提交于
      It is not just a pointer to crush_work, it is the whole structure.
      That is not a problem since it only contains a pointer. But it will
      be a problem if new data members are added to crush_work.
      
      Reflects ceph.git commit ee957dd431bfbeb6dadaf77764db8e0757417328.
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      b88ed8d8
    • I
      libceph, crush: per-pool crush_choose_arg_map for crush_do_rule() · 5cf9c4a9
      Ilya Dryomov 提交于
      If there is no crush_choose_arg_map for a given pool, a NULL pointer is
      passed to preserve existing crush_do_rule() behavior.
      
      Reflects ceph.git commits 55fb91d64071552ea1bc65ab4ea84d3c8b73ab4b,
                                dbe36e08be00c6519a8c89718dd47b0219c20516.
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      5cf9c4a9
    • I
      crush: implement weight and id overrides for straw2 · 069f3222
      Ilya Dryomov 提交于
      bucket_straw2_choose needs to use weights that may be different from
      weight_items. For instance to compensate for an uneven distribution
      caused by a low number of values. Or to fix the probability biais
      introduced by conditional probabilities (see
      http://tracker.ceph.com/issues/15653 for more information).
      
      We introduce a weight_set for each straw2 bucket to set the desired
      weight for a given item at a given position. The weight of a given item
      when picking the first replica (first position) may be different from
      the weight the second replica (second position). For instance the weight
      matrix for a given bucket containing items 3, 7 and 13 could be as
      follows:
      
                position 0   position 1
      
      item 3     0x10000      0x100000
      item 7     0x40000       0x10000
      item 13    0x40000       0x10000
      
      When crush_do_rule picks the first of two replicas (position 0), item 7,
      3 are four times more likely to be choosen by bucket_straw2_choose than
      item 13. When choosing the second replica (position 1), item 3 is ten
      times more likely to be choosen than item 7, 13.
      
      By default the weight_set of each bucket exactly matches the content of
      item_weights for each position to ensure backward compatibility.
      
      bucket_straw2_choose compares items by using their id. The same ids are
      also used to index buckets and they must be unique. For each item in a
      bucket an array of ids can be provided for placement purposes and they
      are used instead of the ids. If no replacement ids are provided, the
      legacy behavior is preserved.
      
      Reflects ceph.git commit 19537a450fd5c5a0bb8b7830947507a76db2ceca.
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      069f3222
    • I
      libceph: apply_upmap() · 1c2e7b45
      Ilya Dryomov 提交于
      Previously, pg_to_raw_osds() didn't filter for existent OSDs because
      raw_to_up_osds() would filter for "up" ("up" is predicated on "exists")
      and raw_to_up_osds() was called directly after pg_to_raw_osds().  Now,
      with apply_upmap() call in there, nonexistent OSDs in pg_to_raw_osds()
      output can affect apply_upmap().  Introduce remove_nonexistent_osds()
      to deal with that.
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      1c2e7b45
    • I
      libceph: compute actual pgid in ceph_pg_to_up_acting_osds() · 463bb8da
      Ilya Dryomov 提交于
      Move raw_pg_to_pg() call out of get_temp_osds() and into
      ceph_pg_to_up_acting_osds(), for upcoming apply_upmap().
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      463bb8da
    • I
      libceph: pg_upmap[_items] infrastructure · 6f428df4
      Ilya Dryomov 提交于
      pg_temp and pg_upmap encodings are the same (PG -> array of osds),
      except for the incremental remove: it's an empty mapping in new_pg_temp
      for pg_temp and a separate old_pg_upmap set for pg_upmap.  (This isn't
      to allow for empty pg_upmap mappings -- apparently, pg_temp just wasn't
      looked at as an example for pg_upmap encoding.)
      
      Reuse __decode_pg_temp() for decoding pg_upmap and new_pg_upmap.
      __decode_pg_temp() stores into pg_temp union member, but since pg_upmap
      union member is identical, reading through pg_upmap later is OK.
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      6f428df4