License cleanup: add SPDX GPL-2.0 license identifier to files with no license
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: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 15:07:57 +01:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-07 12:31:09 -08:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
2010-02-15 12:08:46 -08:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2017-03-03 11:15:06 +02:00
|
|
|
|
2017-09-11 12:10:08 +08:00
|
|
|
|
2020-03-19 23:45:02 -04:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
|
|
|
|
|
2012-05-16 15:16:38 -05:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2023-06-12 15:41:10 +08:00
|
|
|
|
2020-03-19 23:44:59 -04:00
|
|
|
|
2026-02-10 09:06:26 +00:00
|
|
|
|
2020-06-30 03:52:15 -04:00
|
|
|
|
2020-03-19 23:44:59 -04:00
|
|
|
|
2018-05-11 18:47:29 +08:00
|
|
|
|
2020-01-08 05:17:31 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-15 11:51:55 -05:00
|
|
|
|
2020-07-16 10:05:57 -04:00
|
|
|
|
2022-05-26 13:21:31 +08:00
|
|
|
|
|
|
|
|
|
2022-07-27 12:29:10 +08:00
|
|
|
|
2023-07-25 17:51:59 +08:00
|
|
|
|
ceph: handle idmapped mounts in create_request_message()
Inode operations that create a new filesystem object such as ->mknod,
->create, ->mkdir() and others don't take a {g,u}id argument explicitly.
Instead the caller's fs{g,u}id is used for the {g,u}id of the new
filesystem object.
In order to ensure that the correct {g,u}id is used map the caller's
fs{g,u}id for creation requests. This doesn't require complex changes.
It suffices to pass in the relevant idmapping recorded in the request
message. If this request message was triggered from an inode operation
that creates filesystem objects it will have passed down the relevant
idmaping. If this is a request message that was triggered from an inode
operation that doens't need to take idmappings into account the initial
idmapping is passed down which is an identity mapping.
This change uses a new cephfs protocol extension CEPHFS_FEATURE_HAS_OWNER_UIDGID
which adds two new fields (owner_{u,g}id) to the request head structure.
So, we need to ensure that MDS supports it otherwise we need to fail
any IO that comes through an idmapped mount because we can't process it
in a proper way. MDS server without such an extension will use caller_{u,g}id
fields to set a new inode owner UID/GID which is incorrect because caller_{u,g}id
values are unmapped. At the same time we can't map these fields with an
idmapping as it can break UID/GID-based permission checks logic on the
MDS side. This problem was described with a lot of details at [1], [2].
[1] https://lore.kernel.org/lkml/CAEivzxfw1fHO2TFA4dx3u23ZKK6Q+EThfzuibrhA3RKM=ZOYLg@mail.gmail.com/
[2] https://lore.kernel.org/all/20220104140414.155198-3-brauner@kernel.org/
Link: https://github.com/ceph/ceph/pull/52575
Link: https://tracker.ceph.com/issues/62217
Co-Developed-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2023-08-07 15:26:17 +02:00
|
|
|
|
|
|
|
|
|
2023-12-04 13:01:13 +08:00
|
|
|
|
2026-02-10 09:06:26 +00:00
|
|
|
|
2018-05-11 18:47:29 +08:00
|
|
|
|
2026-02-10 09:06:26 +00:00
|
|
|
|
2020-01-08 05:17:31 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-10 16:35:09 +08:00
|
|
|
|
|
|
|
|
|
2019-01-09 10:10:17 +08:00
|
|
|
|
2018-12-10 16:35:09 +08:00
|
|
|
|
2019-01-01 16:28:33 +08:00
|
|
|
|
2019-11-15 11:51:55 -05:00
|
|
|
|
2020-07-16 10:05:57 -04:00
|
|
|
|
2021-01-11 12:35:48 -05:00
|
|
|
|
2022-05-26 13:21:31 +08:00
|
|
|
|
2022-07-27 12:29:10 +08:00
|
|
|
|
2023-07-25 17:51:59 +08:00
|
|
|
|
ceph: handle idmapped mounts in create_request_message()
Inode operations that create a new filesystem object such as ->mknod,
->create, ->mkdir() and others don't take a {g,u}id argument explicitly.
Instead the caller's fs{g,u}id is used for the {g,u}id of the new
filesystem object.
In order to ensure that the correct {g,u}id is used map the caller's
fs{g,u}id for creation requests. This doesn't require complex changes.
It suffices to pass in the relevant idmapping recorded in the request
message. If this request message was triggered from an inode operation
that creates filesystem objects it will have passed down the relevant
idmaping. If this is a request message that was triggered from an inode
operation that doens't need to take idmappings into account the initial
idmapping is passed down which is an identity mapping.
This change uses a new cephfs protocol extension CEPHFS_FEATURE_HAS_OWNER_UIDGID
which adds two new fields (owner_{u,g}id) to the request head structure.
So, we need to ensure that MDS supports it otherwise we need to fail
any IO that comes through an idmapped mount because we can't process it
in a proper way. MDS server without such an extension will use caller_{u,g}id
fields to set a new inode owner UID/GID which is incorrect because caller_{u,g}id
values are unmapped. At the same time we can't map these fields with an
idmapping as it can break UID/GID-based permission checks logic on the
MDS side. This problem was described with a lot of details at [1], [2].
[1] https://lore.kernel.org/lkml/CAEivzxfw1fHO2TFA4dx3u23ZKK6Q+EThfzuibrhA3RKM=ZOYLg@mail.gmail.com/
[2] https://lore.kernel.org/all/20220104140414.155198-3-brauner@kernel.org/
Link: https://github.com/ceph/ceph/pull/52575
Link: https://tracker.ceph.com/issues/62217
Co-Developed-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2023-08-07 15:26:17 +02:00
|
|
|
|
2023-12-04 13:01:13 +08:00
|
|
|
|
2026-02-10 09:06:26 +00:00
|
|
|
|
2018-05-11 18:47:29 +08:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-11-30 09:47:09 -08:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
2023-09-25 16:25:20 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-12-14 17:37:52 -08:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-14 21:29:55 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-14 18:06:41 +08:00
|
|
|
|
2016-03-07 09:35:06 +08:00
|
|
|
|
2018-01-05 10:47:18 +00:00
|
|
|
|
|
|
|
|
|
2019-01-09 11:07:02 +08:00
|
|
|
|
2019-05-29 11:19:42 -04:00
|
|
|
|
2019-04-18 14:15:46 +02:00
|
|
|
|
2020-07-27 10:16:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-28 09:28:44 +08:00
|
|
|
|
2019-06-06 07:29:23 -04:00
|
|
|
|
2026-02-10 09:06:25 +00:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
2016-04-28 09:37:39 +08:00
|
|
|
|
2022-03-14 10:28:35 +08:00
|
|
|
|
2016-04-28 09:37:39 +08:00
|
|
|
|
|
|
|
|
|
2022-03-14 10:28:35 +08:00
|
|
|
|
2016-04-28 09:37:39 +08:00
|
|
|
|
|
|
|
|
|
2016-04-28 15:17:40 +08:00
|
|
|
|
2016-04-28 09:37:39 +08:00
|
|
|
|
|
|
|
|
|
2022-02-14 05:01:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2010-12-01 14:14:38 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-12-01 14:14:38 -08:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-01-11 12:35:48 -05:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2021-01-11 12:35:48 -05:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2022-02-14 05:01:01 +00:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2010-12-01 14:14:38 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-29 13:41:15 +08:00
|
|
|
|
2010-12-01 14:14:38 -08:00
|
|
|
|
2016-04-29 11:27:30 +08:00
|
|
|
|
2017-04-05 12:54:05 -04:00
|
|
|
|
2016-04-29 11:27:30 +08:00
|
|
|
|
2017-04-05 12:54:05 -04:00
|
|
|
|
2016-04-28 09:37:39 +08:00
|
|
|
|
2010-12-01 14:14:38 -08:00
|
|
|
|
2012-12-28 09:56:46 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-12-01 14:14:38 -08:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-13 11:07:04 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2017-04-13 11:07:04 -04:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2017-04-13 11:07:04 -04:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-25 20:16:41 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-05 22:35:51 -05:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-21 17:41:39 +08:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-16 15:16:38 -05:00
|
|
|
|
2009-11-18 16:19:57 -08:00
|
|
|
|
2021-06-04 12:03:09 -04:00
|
|
|
|
|
|
|
|
|
2012-01-12 17:48:10 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-15 09:13:59 -05:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2019-01-14 17:21:19 +08:00
|
|
|
|
2019-07-19 15:22:28 -04:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2013-09-22 11:08:14 +08:00
|
|
|
|
2015-01-05 11:04:04 +08:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2019-01-14 17:21:19 +08:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2020-04-03 13:09:07 -04:00
|
|
|
|
2020-04-01 17:07:52 -04:00
|
|
|
|
2020-04-03 13:09:07 -04:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2020-04-01 17:07:52 -04:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-15 11:51:55 -05:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-14 10:33:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-15 12:08:46 -08:00
|
|
|
|
2010-06-17 16:16:12 -07:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2019-11-15 09:13:59 -05:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-26 11:31:14 -07:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-31 10:28:26 -05:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
ceph: preallocate inode for ops that may create one
When creating a new inode, we need to determine the crypto context
before we can transmit the RPC. The fscrypt API has a routine for getting
a crypto context before a create occurs, but it requires an inode.
Change the ceph code to preallocate an inode in advance of a create of
any sort (open(), mknod(), symlink(), etc). Move the existing code that
generates the ACL and SELinux blobs into this routine since that's
mostly common across all the different codepaths.
In most cases, we just want to allow ceph_fill_trace to use that inode
after the reply comes in, so add a new field to the MDS request for it
(r_new_inode).
The async create codepath is a bit different though. In that case, we
want to hash the inode in advance of the RPC so that it can be used
before the reply comes in. If the call subsequently fails with
-EJUKEBOX, then just put the references and clean up the as_ctx. Note
that with this change, we now need to regenerate the as_ctx when this
occurs, but it's quite rare for it to happen.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-and-tested-by: Luís Henriques <lhenriques@suse.de>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2020-08-26 13:11:00 -04:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2025-01-07 10:04:11 -05:00
|
|
|
|
|
|
|
|
|
2017-02-01 13:49:09 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-31 10:28:26 -05:00
|
|
|
|
2019-12-02 13:47:57 -05:00
|
|
|
|
2022-08-25 09:31:06 -04:00
|
|
|
|
2017-02-01 13:49:09 -05:00
|
|
|
|
|
|
|
|
|
2010-05-13 12:01:13 -07:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2020-07-27 10:16:09 -04:00
|
|
|
|
|
|
|
|
|
2022-08-25 09:31:06 -04:00
|
|
|
|
2020-07-27 10:16:09 -04:00
|
|
|
|
2021-01-14 10:39:22 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2020-02-17 10:19:14 -05:00
|
|
|
|
2022-02-03 09:04:24 -05:00
|
|
|
|
2023-08-07 15:26:16 +02:00
|
|
|
|
2018-07-13 22:18:38 +02:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-16 19:15:28 +08:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-03 09:04:24 -05:00
|
|
|
|
2020-02-18 14:12:45 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-17 10:19:14 -05:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2015-05-15 12:02:17 +03:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2020-03-19 23:45:02 -04:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-27 18:36:06 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-22 15:58:01 -07:00
|
|
|
|
2020-01-13 13:04:08 -05:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-16 20:48:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2022-07-27 12:29:10 +08:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-27 15:33:28 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-03 21:24:49 +08:00
|
|
|
|
2016-03-07 09:35:06 +08:00
|
|
|
|
|
|
|
|
|
2015-04-27 15:33:28 +08:00
|
|
|
|
|
|
|
|
|
2017-12-14 15:11:09 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-04-27 20:05:42 +02:00
|
|
|
|
2017-12-14 15:11:09 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-03-21 10:20:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-06 18:41:57 +02:00
|
|
|
|
|
|
|
|
|
2019-11-20 12:00:59 -05:00
|
|
|
|
|
|
|
|
|
ceph: fix inode number handling on arches with 32-bit ino_t
Tuan and Ulrich mentioned that they were hitting a problem on s390x,
which has a 32-bit ino_t value, even though it's a 64-bit arch (for
historical reasons).
I think the current handling of inode numbers in the ceph driver is
wrong. It tries to use 32-bit inode numbers on 32-bit arches, but that's
actually not a problem. 32-bit arches can deal with 64-bit inode numbers
just fine when userland code is compiled with LFS support (the common
case these days).
What we really want to do is just use 64-bit numbers everywhere, unless
someone has mounted with the ino32 mount option. In that case, we want
to ensure that we hash the inode number down to something that will fit
in 32 bits before presenting the value to userland.
Add new helper functions that do this, and only do the conversion before
presenting these values to userland in getattr and readdir.
The inode table hashvalue is changed to just cast the inode number to
unsigned long, as low-order bits are the most likely to vary anyway.
While it's not strictly required, we do want to put something in
inode->i_ino. Instead of basing it on BITS_PER_LONG, however, base it on
the size of the ino_t type.
NOTE: This is a user-visible change on 32-bit arches:
1/ inode numbers will be seen to have changed between kernel versions.
32-bit arches will see large inode numbers now instead of the hashed
ones they saw before.
2/ any really old software not built with LFS support may start failing
stat() calls with -EOVERFLOW on inode numbers >2^32. Nothing much we
can do about these, but hopefully the intersection of people running
such code on ceph will be very small.
The workaround for both problems is to mount with "-o ino32".
[ idryomov: changelog tweak ]
URL: https://tracker.ceph.com/issues/46828
Reported-by: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Reported-and-Tested-by: Tuan Hoang1 <Tuan.Hoang1@ibm.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2020-08-18 08:03:48 -04:00
|
|
|
|
2019-11-20 12:00:59 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-06 18:41:57 +02:00
|
|
|
|
|
|
|
|
|
2023-07-25 12:03:59 +08:00
|
|
|
|
2022-12-21 14:13:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-07-25 12:03:59 +08:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-11 14:51:23 -07:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2016-07-08 11:25:38 +08:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
2015-01-09 17:00:42 +08:00
|
|
|
|
2020-10-06 12:24:19 -04:00
|
|
|
|
2022-12-21 14:13:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2025-02-04 16:02:49 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-12 17:19:29 +00:00
|
|
|
|
2019-03-21 10:20:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-12 17:19:29 +00:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-05 21:22:13 +08:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2010-02-15 14:37:55 -08:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2019-01-01 16:28:33 +08:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-19 18:54:40 +08:00
|
|
|
|
|
|
|
|
|
2010-02-15 12:08:46 -08:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-14 10:29:16 +08:00
|
|
|
|
2024-04-09 08:56:03 +08:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-09 15:48:57 +08:00
|
|
|
|
2016-07-06 11:12:56 +08:00
|
|
|
|
2011-05-24 11:46:31 -07:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-01-31 16:55:51 +08:00
|
|
|
|
2019-02-01 14:57:15 +08:00
|
|
|
|
2019-01-31 16:55:51 +08:00
|
|
|
|
2023-09-14 10:29:16 +08:00
|
|
|
|
|
|
|
|
|
2010-06-17 16:16:12 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-06 18:41:57 +02:00
|
|
|
|
2019-11-20 12:00:59 -05:00
|
|
|
|
2024-06-06 18:41:57 +02:00
|
|
|
|
2010-06-17 16:16:12 -07:00
|
|
|
|
|
|
|
|
|
2019-02-01 14:57:15 +08:00
|
|
|
|
2010-06-17 16:16:12 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-01-31 16:55:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-27 15:33:28 +08:00
|
|
|
|
2020-03-19 23:44:59 -04:00
|
|
|
|
2026-02-10 09:06:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-19 23:44:59 -04:00
|
|
|
|
2017-12-14 15:11:09 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-27 15:33:28 +08:00
|
|
|
|
|
|
|
|
|
2017-09-11 12:10:08 +08:00
|
|
|
|
2023-09-25 16:25:20 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-11 12:10:08 +08:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-30 03:52:15 -04:00
|
|
|
|
2020-10-12 09:39:06 -04:00
|
|
|
|
2020-06-30 03:52:15 -04:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-19 13:51:08 +01:00
|
|
|
|
|
|
|
|
|
2019-12-19 19:44:09 -05:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2015-07-01 16:27:46 +08:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-05-14 10:02:57 -07:00
|
|
|
|
2014-03-29 13:41:15 +08:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
2019-04-02 09:24:36 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-03 09:04:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-18 14:12:45 -05:00
|
|
|
|
2024-01-04 09:21:30 +08:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
2009-12-07 12:31:09 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
2021-07-05 09:22:56 +08:00
|
|
|
|
2021-07-05 09:22:55 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-05 09:22:54 +08:00
|
|
|
|
2019-01-14 17:21:19 +08:00
|
|
|
|
|
|
|
|
|
2024-07-29 16:02:02 +08:00
|
|
|
|
|
|
|
|
|
2019-01-31 16:55:51 +08:00
|
|
|
|
2019-02-01 14:57:15 +08:00
|
|
|
|
2023-09-14 10:29:16 +08:00
|
|
|
|
2019-04-24 12:09:04 -04:00
|
|
|
|
2023-04-19 10:39:14 +08:00
|
|
|
|
2019-04-24 12:09:04 -04:00
|
|
|
|
2023-11-07 14:55:46 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
2025-08-12 09:57:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-29 12:13:14 -04:00
|
|
|
|
2025-08-12 09:57:38 +00:00
|
|
|
|
|
|
|
|
|
2019-04-29 12:13:14 -04:00
|
|
|
|
|
|
|
|
|
2023-06-09 15:15:47 +08:00
|
|
|
|
2025-08-12 09:57:38 +00:00
|
|
|
|
2020-08-07 09:28:31 -04:00
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-08 11:25:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|
2013-11-24 14:33:01 +08:00
|
|
|
|
|
|
|
|
|
2010-06-21 13:45:04 -07:00
|
|
|
|
2018-01-24 21:24:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-15 11:51:55 -05:00
|
|
|
|
2020-01-14 15:06:40 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-18 22:49:26 +08:00
|
|
|
|
2020-01-14 15:06:40 -05:00
|
|
|
|
2019-11-15 11:51:55 -05:00
|
|
|
|
2022-05-10 09:47:01 +08:00
|
|
|
|
2019-11-15 11:51:55 -05:00
|
|
|
|
|
|
|
|
|
2023-08-07 15:26:18 +02:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:09 -07:00
|
|
|
|