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
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-25 17:47:45 +03:00
|
|
|
|
2017-03-21 13:44:28 +01:00
|
|
|
|
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-24 17:04:11 +09:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2013-01-31 16:02:01 -06:00
|
|
|
|
2010-04-06 15:01:27 -07:00
|
|
|
|
2013-01-31 16:02:01 -06:00
|
|
|
|
2011-09-23 11:48:42 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2013-12-24 21:19:24 +02:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-15 11:47:34 -04:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-20 21:53:53 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-27 12:31:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-20 21:53:53 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-22 22:15:49 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-20 17:29:55 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
2013-02-20 10:25:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-01 12:43:04 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-01 12:43:04 -05:00
|
|
|
|
2013-05-01 12:43:04 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-01 17:19:38 +08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-04-13 14:07:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-02-15 07:43:55 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2014-06-24 16:21:45 +04:00
|
|
|
|
2015-07-03 15:44:41 +03:00
|
|
|
|
2013-02-19 12:25:57 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2012-01-23 15:49:27 -06:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-01-23 15:49:27 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-01-23 15:49:27 -06:00
|
|
|
|
|
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-23 15:49:27 -06:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-01-23 15:49:27 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-23 15:49:27 -06:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-23 15:49:27 -06:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2009-11-03 15:17:56 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2013-05-01 12:43:04 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-13 15:18:39 +08:00
|
|
|
|
2013-05-01 12:43:04 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-13 15:18:39 +08:00
|
|
|
|
2013-05-01 12:43:04 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-01 12:43:04 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-01 12:43:04 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-01 12:43:04 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-19 12:25:56 -06:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
|
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
|
|
|
|
|
mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros
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: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-04-01 15:29:47 +03:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2015-06-25 21:02:57 +02:00
|
|
|
|
|
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
|
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2015-06-25 21:02:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-23 15:49:27 -06:00
|
|
|
|
|
|
|
|
|
mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros
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: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-04-01 15:29:47 +03:00
|
|
|
|
2012-01-23 15:49:27 -06:00
|
|
|
|
2014-10-10 16:39:05 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
|
|
|
|
|
2012-01-23 15:49:27 -06:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
|
|
|
|
|
2012-01-23 15:49:27 -06:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-23 15:49:27 -06:00
|
|
|
|
|
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-06-11 16:58:48 -07:00
|
|
|
|
2010-05-29 09:41:23 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2010-05-29 09:41:23 -07:00
|
|
|
|
2012-05-22 22:15:49 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-30 18:16:16 -07:00
|
|
|
|
|
|
|
|
|
2012-05-22 22:15:49 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-30 18:16:16 -07:00
|
|
|
|
|
|
|
|
|
2012-05-22 22:15:49 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-30 18:16:16 -07:00
|
|
|
|
|
|
|
|
|
2012-05-22 22:15:49 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-30 18:16:16 -07:00
|
|
|
|
|
|
|
|
|
2012-05-22 22:15:49 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-27 12:31:02 -07:00
|
|
|
|
2012-07-30 18:16:16 -07:00
|
|
|
|
|
|
|
|
|
2012-05-22 22:15:49 -05:00
|
|
|
|
2012-07-30 18:16:16 -07:00
|
|
|
|
|
|
|
|
|
2012-05-22 22:15:49 -05:00
|
|
|
|
2010-05-29 09:41:23 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-11 16:15:36 -04:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-01-23 15:49:27 -06:00
|
|
|
|
2012-07-08 19:50:33 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-23 15:49:27 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-05-22 11:41:43 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-22 11:41:43 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-02-29 08:30:58 -07:00
|
|
|
|
|
|
|
|
|
2012-05-22 11:41:43 -05:00
|
|
|
|
2012-02-29 08:30:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-20 10:25:12 -06:00
|
|
|
|
2013-07-22 20:26:31 -07:00
|
|
|
|
2012-05-22 11:41:43 -05:00
|
|
|
|
2012-02-29 08:30:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-05-22 11:41:43 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-22 11:41:43 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-01-23 15:49:27 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-05-22 11:41:43 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-22 11:41:43 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-05-22 11:41:43 -05:00
|
|
|
|
2012-05-22 22:15:49 -05:00
|
|
|
|
2013-02-20 10:25:12 -06:00
|
|
|
|
2012-06-20 21:53:53 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2012-05-22 11:41:43 -05:00
|
|
|
|
2012-05-22 22:15:49 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-23 15:49:27 -06:00
|
|
|
|
2012-05-22 11:41:43 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-07-01 15:18:31 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2017-03-21 13:44:28 +01:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-21 13:44:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-25 17:47:45 +03:00
|
|
|
|
2015-05-08 21:08:05 -05:00
|
|
|
|
2017-03-21 13:44:28 +01:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2015-04-02 14:40:58 +03:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-04-13 14:07:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-06-09 14:19:21 -07:00
|
|
|
|
2010-07-01 15:18:31 -07:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-01-23 15:49:27 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2012-01-23 15:49:27 -06:00
|
|
|
|
2014-10-16 01:50:19 -05:00
|
|
|
|
2015-10-28 23:50:58 +01:00
|
|
|
|
2015-01-23 16:41:25 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-23 15:49:27 -06:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-25 08:17:48 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2015-11-15 00:12:48 -05:00
|
|
|
|
|
|
|
|
|
2011-01-25 08:17:48 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2013-03-08 20:58:59 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-15 00:12:48 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-08 20:58:59 -06:00
|
|
|
|
|
|
|
|
|
2015-11-15 00:12:48 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-08 20:58:59 -06:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-25 08:19:34 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-25 08:19:34 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2014-04-23 12:35:09 +08:00
|
|
|
|
2013-03-06 23:39:38 -06:00
|
|
|
|
2012-03-07 11:40:08 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-23 12:35:09 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-09 20:55:45 -05:00
|
|
|
|
|
|
|
|
|
2014-04-23 12:35:09 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-09 20:55:45 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-23 12:35:09 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-30 18:16:16 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2012-07-30 18:16:16 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-20 21:53:53 -05:00
|
|
|
|
|
|
|
|
|
2012-07-20 17:29:55 -07:00
|
|
|
|
2012-06-20 21:53:53 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-20 10:25:12 -06:00
|
|
|
|
2012-07-30 18:16:16 -07:00
|
|
|
|
2012-05-22 22:15:49 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-27 20:27:04 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-11 09:48:05 -08:00
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
2009-12-11 09:48:05 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2009-12-14 14:04:30 -08:00
|
|
|
|
2015-11-02 17:13:58 +01:00
|
|
|
|
2009-12-14 14:04:30 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-04-02 16:07:19 -07:00
|
|
|
|
libceph: fix ceph_msg_revoke()
There are a number of problems with revoking a "was sending" message:
(1) We never make any attempt to revoke data - only kvecs contibute to
con->out_skip. However, once the header (envelope) is written to the
socket, our peer learns data_len and sets itself to expect at least
data_len bytes to follow front or front+middle. If ceph_msg_revoke()
is called while the messenger is sending message's data portion,
anything we send after that call is counted by the OSD towards the now
revoked message's data portion. The effects vary, the most common one
is the eventual hang - higher layers get stuck waiting for the reply to
the message that was sent out after ceph_msg_revoke() returned and
treated by the OSD as a bunch of data bytes. This is what Matt ran
into.
(2) Flat out zeroing con->out_kvec_bytes worth of bytes to handle kvecs
is wrong. If ceph_msg_revoke() is called before the tag is sent out or
while the messenger is sending the header, we will get a connection
reset, either due to a bad tag (0 is not a valid tag) or a bad header
CRC, which kind of defeats the purpose of revoke. Currently the kernel
client refuses to work with header CRCs disabled, but that will likely
change in the future, making this even worse.
(3) con->out_skip is not reset on connection reset, leading to one or
more spurious connection resets if we happen to get a real one between
con->out_skip is set in ceph_msg_revoke() and before it's cleared in
write_partial_skip().
Fixing (1) and (3) is trivial. The idea behind fixing (2) is to never
zero the tag or the header, i.e. send out tag+header regardless of when
ceph_msg_revoke() is called. That way the header is always correct, no
unnecessary resets are induced and revoke stands ready for disabled
CRCs. Since ceph_msg_revoke() rips out con->out_msg, introduce a new
"message out temp" and copy the header into it before sending.
Cc: stable@vger.kernel.org # 4.0+
Reported-by: Matt Conner <matt.conner@keepertech.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Matt Conner <matt.conner@keepertech.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-12-28 13:18:34 +03:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-30 16:24:37 -07:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
|
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
2012-05-29 11:04:58 -05:00
|
|
|
|
2013-02-20 10:25:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-29 11:04:58 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-04-02 16:16:34 -07:00
|
|
|
|
2014-06-24 16:21:45 +04:00
|
|
|
|
2012-07-20 16:45:49 -07:00
|
|
|
|
2009-12-22 10:43:42 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-27 12:24:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-07-30 16:21:40 -07:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
2012-12-26 10:43:57 -06:00
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
2012-05-29 11:04:58 -05:00
|
|
|
|
2012-06-27 12:24:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2009-11-20 15:14:15 -08:00
|
|
|
|
2012-07-30 16:21:40 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
ceph: avoid reopening osd connections when address hasn't changed
We get a fault callback on _every_ tcp connection fault. Normally, we
want to reopen the connection when that happens. If the address we have
is bad, however, and connection attempts always result in a connection
refused or similar error, explicitly closing and reopening the msgr
connection just prevents the messenger's backoff logic from kicking in.
The result can be a console full of
[ 3974.417106] ceph: osd11 10.3.14.138:6800 connection failed
[ 3974.423295] ceph: osd11 10.3.14.138:6800 connection failed
[ 3974.429709] ceph: osd11 10.3.14.138:6800 connection failed
Instead, if we get a fault, and have outstanding requests, but the osd
address hasn't changed and the connection never successfully connected in
the first place, do nothing to the osd connection. The messenger layer
will back off and retry periodically, because we never connected and thus
the lossy bit is not set.
Instead, touch each request's r_stamp so that handle_timeout can tell the
request is still alive and kicking.
Signed-off-by: Sage Weil <sage@newdream.net>
2010-03-22 14:51:18 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-26 23:26:43 -05:00
|
|
|
|
|
|
|
|
|
2012-06-27 12:24:08 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-26 23:26:43 -05:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-05-22 22:15:49 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-22 10:43:42 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2015-07-03 15:44:41 +03:00
|
|
|
|
2012-05-29 11:04:58 -05:00
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-23 14:35:23 -05:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
libceph: fix ceph_msg_revoke()
There are a number of problems with revoking a "was sending" message:
(1) We never make any attempt to revoke data - only kvecs contibute to
con->out_skip. However, once the header (envelope) is written to the
socket, our peer learns data_len and sets itself to expect at least
data_len bytes to follow front or front+middle. If ceph_msg_revoke()
is called while the messenger is sending message's data portion,
anything we send after that call is counted by the OSD towards the now
revoked message's data portion. The effects vary, the most common one
is the eventual hang - higher layers get stuck waiting for the reply to
the message that was sent out after ceph_msg_revoke() returned and
treated by the OSD as a bunch of data bytes. This is what Matt ran
into.
(2) Flat out zeroing con->out_kvec_bytes worth of bytes to handle kvecs
is wrong. If ceph_msg_revoke() is called before the tag is sent out or
while the messenger is sending the header, we will get a connection
reset, either due to a bad tag (0 is not a valid tag) or a bad header
CRC, which kind of defeats the purpose of revoke. Currently the kernel
client refuses to work with header CRCs disabled, but that will likely
change in the future, making this even worse.
(3) con->out_skip is not reset on connection reset, leading to one or
more spurious connection resets if we happen to get a real one between
con->out_skip is set in ceph_msg_revoke() and before it's cleared in
write_partial_skip().
Fixing (1) and (3) is trivial. The idea behind fixing (2) is to never
zero the tag or the header, i.e. send out tag+header regardless of when
ceph_msg_revoke() is called. That way the header is always correct, no
unnecessary resets are induced and revoke stands ready for disabled
CRCs. Since ceph_msg_revoke() rips out con->out_msg, introduce a new
"message out temp" and copy the header into it before sending.
Cc: stable@vger.kernel.org # 4.0+
Reported-by: Matt Conner <matt.conner@keepertech.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Matt Conner <matt.conner@keepertech.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-12-28 13:18:34 +03:00
|
|
|
|
|
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-23 14:35:23 -05:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
|
|
|
|
|
libceph: fix ceph_msg_revoke()
There are a number of problems with revoking a "was sending" message:
(1) We never make any attempt to revoke data - only kvecs contibute to
con->out_skip. However, once the header (envelope) is written to the
socket, our peer learns data_len and sets itself to expect at least
data_len bytes to follow front or front+middle. If ceph_msg_revoke()
is called while the messenger is sending message's data portion,
anything we send after that call is counted by the OSD towards the now
revoked message's data portion. The effects vary, the most common one
is the eventual hang - higher layers get stuck waiting for the reply to
the message that was sent out after ceph_msg_revoke() returned and
treated by the OSD as a bunch of data bytes. This is what Matt ran
into.
(2) Flat out zeroing con->out_kvec_bytes worth of bytes to handle kvecs
is wrong. If ceph_msg_revoke() is called before the tag is sent out or
while the messenger is sending the header, we will get a connection
reset, either due to a bad tag (0 is not a valid tag) or a bad header
CRC, which kind of defeats the purpose of revoke. Currently the kernel
client refuses to work with header CRCs disabled, but that will likely
change in the future, making this even worse.
(3) con->out_skip is not reset on connection reset, leading to one or
more spurious connection resets if we happen to get a real one between
con->out_skip is set in ceph_msg_revoke() and before it's cleared in
write_partial_skip().
Fixing (1) and (3) is trivial. The idea behind fixing (2) is to never
zero the tag or the header, i.e. send out tag+header regardless of when
ceph_msg_revoke() is called. That way the header is always correct, no
unnecessary resets are induced and revoke stands ready for disabled
CRCs. Since ceph_msg_revoke() rips out con->out_msg, introduce a new
"message out temp" and copy the header into it before sending.
Cc: stable@vger.kernel.org # 4.0+
Reported-by: Matt Conner <matt.conner@keepertech.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Matt Conner <matt.conner@keepertech.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-12-28 13:18:34 +03:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
libceph: fix ceph_msg_revoke()
There are a number of problems with revoking a "was sending" message:
(1) We never make any attempt to revoke data - only kvecs contibute to
con->out_skip. However, once the header (envelope) is written to the
socket, our peer learns data_len and sets itself to expect at least
data_len bytes to follow front or front+middle. If ceph_msg_revoke()
is called while the messenger is sending message's data portion,
anything we send after that call is counted by the OSD towards the now
revoked message's data portion. The effects vary, the most common one
is the eventual hang - higher layers get stuck waiting for the reply to
the message that was sent out after ceph_msg_revoke() returned and
treated by the OSD as a bunch of data bytes. This is what Matt ran
into.
(2) Flat out zeroing con->out_kvec_bytes worth of bytes to handle kvecs
is wrong. If ceph_msg_revoke() is called before the tag is sent out or
while the messenger is sending the header, we will get a connection
reset, either due to a bad tag (0 is not a valid tag) or a bad header
CRC, which kind of defeats the purpose of revoke. Currently the kernel
client refuses to work with header CRCs disabled, but that will likely
change in the future, making this even worse.
(3) con->out_skip is not reset on connection reset, leading to one or
more spurious connection resets if we happen to get a real one between
con->out_skip is set in ceph_msg_revoke() and before it's cleared in
write_partial_skip().
Fixing (1) and (3) is trivial. The idea behind fixing (2) is to never
zero the tag or the header, i.e. send out tag+header regardless of when
ceph_msg_revoke() is called. That way the header is always correct, no
unnecessary resets are induced and revoke stands ready for disabled
CRCs. Since ceph_msg_revoke() rips out con->out_msg, introduce a new
"message out temp" and copy the header into it before sending.
Cc: stable@vger.kernel.org # 4.0+
Reported-by: Matt Conner <matt.conner@keepertech.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Matt Conner <matt.conner@keepertech.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-12-28 13:18:34 +03:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
libceph: fix ceph_msg_revoke()
There are a number of problems with revoking a "was sending" message:
(1) We never make any attempt to revoke data - only kvecs contibute to
con->out_skip. However, once the header (envelope) is written to the
socket, our peer learns data_len and sets itself to expect at least
data_len bytes to follow front or front+middle. If ceph_msg_revoke()
is called while the messenger is sending message's data portion,
anything we send after that call is counted by the OSD towards the now
revoked message's data portion. The effects vary, the most common one
is the eventual hang - higher layers get stuck waiting for the reply to
the message that was sent out after ceph_msg_revoke() returned and
treated by the OSD as a bunch of data bytes. This is what Matt ran
into.
(2) Flat out zeroing con->out_kvec_bytes worth of bytes to handle kvecs
is wrong. If ceph_msg_revoke() is called before the tag is sent out or
while the messenger is sending the header, we will get a connection
reset, either due to a bad tag (0 is not a valid tag) or a bad header
CRC, which kind of defeats the purpose of revoke. Currently the kernel
client refuses to work with header CRCs disabled, but that will likely
change in the future, making this even worse.
(3) con->out_skip is not reset on connection reset, leading to one or
more spurious connection resets if we happen to get a real one between
con->out_skip is set in ceph_msg_revoke() and before it's cleared in
write_partial_skip().
Fixing (1) and (3) is trivial. The idea behind fixing (2) is to never
zero the tag or the header, i.e. send out tag+header regardless of when
ceph_msg_revoke() is called. That way the header is always correct, no
unnecessary resets are induced and revoke stands ready for disabled
CRCs. Since ceph_msg_revoke() rips out con->out_msg, introduce a new
"message out temp" and copy the header into it before sending.
Cc: stable@vger.kernel.org # 4.0+
Reported-by: Matt Conner <matt.conner@keepertech.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Matt Conner <matt.conner@keepertech.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-12-28 13:18:34 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-11 14:57:13 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-11 23:34:22 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-08-07 14:30:24 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-08-07 14:30:24 -07:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-07 14:30:24 -07:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-08-07 14:30:24 -07:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-11 23:34:22 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-07 14:30:24 -07:00
|
|
|
|
2013-03-11 23:34:22 -05:00
|
|
|
|
2013-03-30 15:09:59 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-08-07 14:30:24 -07:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
|
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
2013-08-07 14:30:24 -07:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-07 14:30:24 -07:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-11 23:34:22 -05:00
|
|
|
|
|
|
|
|
|
2013-08-07 14:30:24 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-07 14:30:24 -07:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2014-02-05 15:19:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
2013-03-11 23:34:22 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-07 14:30:24 -07:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-11 23:34:22 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2012-06-11 14:57:13 -05:00
|
|
|
|
2013-03-07 15:38:28 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-11 23:34:22 -05:00
|
|
|
|
2013-03-07 15:38:28 -06:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-07 15:38:28 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2013-03-07 15:38:28 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-30 23:46:55 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-08 12:43:39 +04:00
|
|
|
|
2013-03-07 15:38:28 -06:00
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-07 15:38:28 -06:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-07 15:38:28 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-11 23:34:22 -05:00
|
|
|
|
2013-03-07 15:38:28 -06:00
|
|
|
|
2013-03-11 23:34:22 -05:00
|
|
|
|
2013-03-07 15:38:28 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-07 15:38:28 -06:00
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-07 15:38:28 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-30 15:09:59 -05:00
|
|
|
|
|
|
|
|
|
2013-03-07 15:38:28 -06:00
|
|
|
|
|
|
|
|
|
2014-03-23 06:50:39 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-30 15:09:59 -05:00
|
|
|
|
2013-03-07 15:38:28 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-11 23:34:22 -05:00
|
|
|
|
2013-03-07 15:38:28 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
|
|
|
|
|
2013-03-11 23:34:22 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-11 23:34:22 -05:00
|
|
|
|
|
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
2013-04-19 15:34:49 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-11 23:34:22 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-30 15:09:59 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-30 15:09:59 -05:00
|
|
|
|
2013-03-11 23:34:22 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-11 23:34:22 -05:00
|
|
|
|
|
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-11 23:34:22 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-30 15:09:59 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-23 06:50:39 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-16 21:46:32 +08:00
|
|
|
|
2013-03-11 23:34:22 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
|
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-07 15:38:28 -06:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-07 15:38:28 -06:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
|
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-07 15:38:28 -06:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-07 15:38:28 -06:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-19 11:38:17 +02:00
|
|
|
|
|
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-11 23:34:22 -05:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-07 15:38:28 -06:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-07 15:38:28 -06:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-16 21:46:32 +08:00
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2013-04-19 15:34:49 -05:00
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2013-04-19 15:34:49 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
2016-02-19 11:38:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-02 12:09:50 -05:00
|
|
|
|
2012-06-11 14:57:13 -05:00
|
|
|
|
|
|
|
|
|
2013-03-11 23:34:22 -05:00
|
|
|
|
2012-06-11 14:57:13 -05:00
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2012-06-11 14:57:13 -05:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-11 14:57:13 -05:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2016-02-20 15:56:07 +01:00
|
|
|
|
2014-11-04 16:33:37 +08:00
|
|
|
|
|
|
|
|
|
2015-10-26 22:23:56 +01:00
|
|
|
|
2014-11-04 16:33:37 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2009-12-14 14:04:30 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-02-15 07:43:54 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-05-23 14:35:23 -05:00
|
|
|
|
2009-12-14 14:04:30 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-23 14:35:23 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-05-23 14:35:23 -05:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2009-12-14 14:04:30 -08:00
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
2011-07-26 11:27:24 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-05-11 21:20:38 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
2017-07-26 09:59:15 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2013-04-02 12:09:50 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2013-04-02 12:09:50 -05:00
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2012-05-23 14:35:23 -05:00
|
|
|
|
libceph: fix ceph_msg_revoke()
There are a number of problems with revoking a "was sending" message:
(1) We never make any attempt to revoke data - only kvecs contibute to
con->out_skip. However, once the header (envelope) is written to the
socket, our peer learns data_len and sets itself to expect at least
data_len bytes to follow front or front+middle. If ceph_msg_revoke()
is called while the messenger is sending message's data portion,
anything we send after that call is counted by the OSD towards the now
revoked message's data portion. The effects vary, the most common one
is the eventual hang - higher layers get stuck waiting for the reply to
the message that was sent out after ceph_msg_revoke() returned and
treated by the OSD as a bunch of data bytes. This is what Matt ran
into.
(2) Flat out zeroing con->out_kvec_bytes worth of bytes to handle kvecs
is wrong. If ceph_msg_revoke() is called before the tag is sent out or
while the messenger is sending the header, we will get a connection
reset, either due to a bad tag (0 is not a valid tag) or a bad header
CRC, which kind of defeats the purpose of revoke. Currently the kernel
client refuses to work with header CRCs disabled, but that will likely
change in the future, making this even worse.
(3) con->out_skip is not reset on connection reset, leading to one or
more spurious connection resets if we happen to get a real one between
con->out_skip is set in ceph_msg_revoke() and before it's cleared in
write_partial_skip().
Fixing (1) and (3) is trivial. The idea behind fixing (2) is to never
zero the tag or the header, i.e. send out tag+header regardless of when
ceph_msg_revoke() is called. That way the header is always correct, no
unnecessary resets are induced and revoke stands ready for disabled
CRCs. Since ceph_msg_revoke() rips out con->out_msg, introduce a new
"message out temp" and copy the header into it before sending.
Cc: stable@vger.kernel.org # 4.0+
Reported-by: Matt Conner <matt.conner@keepertech.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Matt Conner <matt.conner@keepertech.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-12-28 13:18:34 +03:00
|
|
|
|
2012-05-23 14:35:23 -05:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-05-23 14:35:23 -05:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
libceph: fix ceph_msg_revoke()
There are a number of problems with revoking a "was sending" message:
(1) We never make any attempt to revoke data - only kvecs contibute to
con->out_skip. However, once the header (envelope) is written to the
socket, our peer learns data_len and sets itself to expect at least
data_len bytes to follow front or front+middle. If ceph_msg_revoke()
is called while the messenger is sending message's data portion,
anything we send after that call is counted by the OSD towards the now
revoked message's data portion. The effects vary, the most common one
is the eventual hang - higher layers get stuck waiting for the reply to
the message that was sent out after ceph_msg_revoke() returned and
treated by the OSD as a bunch of data bytes. This is what Matt ran
into.
(2) Flat out zeroing con->out_kvec_bytes worth of bytes to handle kvecs
is wrong. If ceph_msg_revoke() is called before the tag is sent out or
while the messenger is sending the header, we will get a connection
reset, either due to a bad tag (0 is not a valid tag) or a bad header
CRC, which kind of defeats the purpose of revoke. Currently the kernel
client refuses to work with header CRCs disabled, but that will likely
change in the future, making this even worse.
(3) con->out_skip is not reset on connection reset, leading to one or
more spurious connection resets if we happen to get a real one between
con->out_skip is set in ceph_msg_revoke() and before it's cleared in
write_partial_skip().
Fixing (1) and (3) is trivial. The idea behind fixing (2) is to never
zero the tag or the header, i.e. send out tag+header regardless of when
ceph_msg_revoke() is called. That way the header is always correct, no
unnecessary resets are induced and revoke stands ready for disabled
CRCs. Since ceph_msg_revoke() rips out con->out_msg, introduce a new
"message out temp" and copy the header into it before sending.
Cc: stable@vger.kernel.org # 4.0+
Reported-by: Matt Conner <matt.conner@keepertech.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Matt Conner <matt.conner@keepertech.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-12-28 13:18:34 +03:00
|
|
|
|
2012-02-15 07:43:54 -06:00
|
|
|
|
|
|
|
|
|
libceph: fix ceph_msg_revoke()
There are a number of problems with revoking a "was sending" message:
(1) We never make any attempt to revoke data - only kvecs contibute to
con->out_skip. However, once the header (envelope) is written to the
socket, our peer learns data_len and sets itself to expect at least
data_len bytes to follow front or front+middle. If ceph_msg_revoke()
is called while the messenger is sending message's data portion,
anything we send after that call is counted by the OSD towards the now
revoked message's data portion. The effects vary, the most common one
is the eventual hang - higher layers get stuck waiting for the reply to
the message that was sent out after ceph_msg_revoke() returned and
treated by the OSD as a bunch of data bytes. This is what Matt ran
into.
(2) Flat out zeroing con->out_kvec_bytes worth of bytes to handle kvecs
is wrong. If ceph_msg_revoke() is called before the tag is sent out or
while the messenger is sending the header, we will get a connection
reset, either due to a bad tag (0 is not a valid tag) or a bad header
CRC, which kind of defeats the purpose of revoke. Currently the kernel
client refuses to work with header CRCs disabled, but that will likely
change in the future, making this even worse.
(3) con->out_skip is not reset on connection reset, leading to one or
more spurious connection resets if we happen to get a real one between
con->out_skip is set in ceph_msg_revoke() and before it's cleared in
write_partial_skip().
Fixing (1) and (3) is trivial. The idea behind fixing (2) is to never
zero the tag or the header, i.e. send out tag+header regardless of when
ceph_msg_revoke() is called. That way the header is always correct, no
unnecessary resets are induced and revoke stands ready for disabled
CRCs. Since ceph_msg_revoke() rips out con->out_msg, introduce a new
"message out temp" and copy the header into it before sending.
Cc: stable@vger.kernel.org # 4.0+
Reported-by: Matt Conner <matt.conner@keepertech.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Matt Conner <matt.conner@keepertech.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-12-28 13:18:34 +03:00
|
|
|
|
2012-02-15 07:43:54 -06:00
|
|
|
|
libceph: fix ceph_msg_revoke()
There are a number of problems with revoking a "was sending" message:
(1) We never make any attempt to revoke data - only kvecs contibute to
con->out_skip. However, once the header (envelope) is written to the
socket, our peer learns data_len and sets itself to expect at least
data_len bytes to follow front or front+middle. If ceph_msg_revoke()
is called while the messenger is sending message's data portion,
anything we send after that call is counted by the OSD towards the now
revoked message's data portion. The effects vary, the most common one
is the eventual hang - higher layers get stuck waiting for the reply to
the message that was sent out after ceph_msg_revoke() returned and
treated by the OSD as a bunch of data bytes. This is what Matt ran
into.
(2) Flat out zeroing con->out_kvec_bytes worth of bytes to handle kvecs
is wrong. If ceph_msg_revoke() is called before the tag is sent out or
while the messenger is sending the header, we will get a connection
reset, either due to a bad tag (0 is not a valid tag) or a bad header
CRC, which kind of defeats the purpose of revoke. Currently the kernel
client refuses to work with header CRCs disabled, but that will likely
change in the future, making this even worse.
(3) con->out_skip is not reset on connection reset, leading to one or
more spurious connection resets if we happen to get a real one between
con->out_skip is set in ceph_msg_revoke() and before it's cleared in
write_partial_skip().
Fixing (1) and (3) is trivial. The idea behind fixing (2) is to never
zero the tag or the header, i.e. send out tag+header regardless of when
ceph_msg_revoke() is called. That way the header is always correct, no
unnecessary resets are induced and revoke stands ready for disabled
CRCs. Since ceph_msg_revoke() rips out con->out_msg, introduce a new
"message out temp" and copy the header into it before sending.
Cc: stable@vger.kernel.org # 4.0+
Reported-by: Matt Conner <matt.conner@keepertech.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Matt Conner <matt.conner@keepertech.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-12-28 13:18:34 +03:00
|
|
|
|
2012-02-15 07:43:54 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-06-11 14:57:13 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
libceph: fix ceph_msg_revoke()
There are a number of problems with revoking a "was sending" message:
(1) We never make any attempt to revoke data - only kvecs contibute to
con->out_skip. However, once the header (envelope) is written to the
socket, our peer learns data_len and sets itself to expect at least
data_len bytes to follow front or front+middle. If ceph_msg_revoke()
is called while the messenger is sending message's data portion,
anything we send after that call is counted by the OSD towards the now
revoked message's data portion. The effects vary, the most common one
is the eventual hang - higher layers get stuck waiting for the reply to
the message that was sent out after ceph_msg_revoke() returned and
treated by the OSD as a bunch of data bytes. This is what Matt ran
into.
(2) Flat out zeroing con->out_kvec_bytes worth of bytes to handle kvecs
is wrong. If ceph_msg_revoke() is called before the tag is sent out or
while the messenger is sending the header, we will get a connection
reset, either due to a bad tag (0 is not a valid tag) or a bad header
CRC, which kind of defeats the purpose of revoke. Currently the kernel
client refuses to work with header CRCs disabled, but that will likely
change in the future, making this even worse.
(3) con->out_skip is not reset on connection reset, leading to one or
more spurious connection resets if we happen to get a real one between
con->out_skip is set in ceph_msg_revoke() and before it's cleared in
write_partial_skip().
Fixing (1) and (3) is trivial. The idea behind fixing (2) is to never
zero the tag or the header, i.e. send out tag+header regardless of when
ceph_msg_revoke() is called. That way the header is always correct, no
unnecessary resets are induced and revoke stands ready for disabled
CRCs. Since ceph_msg_revoke() rips out con->out_msg, introduce a new
"message out temp" and copy the header into it before sending.
Cc: stable@vger.kernel.org # 4.0+
Reported-by: Matt Conner <matt.conner@keepertech.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Matt Conner <matt.conner@keepertech.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-12-28 13:18:34 +03:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2012-06-11 14:57:13 -05:00
|
|
|
|
2013-04-02 12:09:50 -05:00
|
|
|
|
|
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2013-02-20 10:25:12 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-23 14:35:23 -05:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2012-05-23 14:35:23 -05:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-05-23 14:35:23 -05:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2013-02-20 10:25:12 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2013-03-25 08:47:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-23 14:35:23 -05:00
|
|
|
|
2015-09-01 17:19:38 +08:00
|
|
|
|
2017-05-08 15:59:19 -07:00
|
|
|
|
2015-09-14 16:01:05 +03:00
|
|
|
|
2017-05-08 15:59:19 -07:00
|
|
|
|
2015-09-01 17:19:38 +08:00
|
|
|
|
2015-09-14 16:01:05 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-01 17:19:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-20 10:25:12 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
|
|
|
|
|
2009-11-18 16:19:57 -08:00
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
2012-05-16 15:16:38 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
2012-05-16 15:16:38 -05:00
|
|
|
|
|
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
2011-05-19 11:21:05 -07:00
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
|
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
2009-11-18 16:19:57 -08:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-16 15:16:38 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-05-23 14:35:23 -05:00
|
|
|
|
|
|
|
|
|
2012-05-16 15:16:38 -05:00
|
|
|
|
2009-11-10 14:34:36 -08:00
|
|
|
|
|
|
|
|
|
2013-02-20 10:25:12 -06:00
|
|
|
|
2009-11-10 14:34:36 -08:00
|
|
|
|
|
|
|
|
|
2012-05-16 15:16:38 -05:00
|
|
|
|
2009-11-10 14:34:36 -08:00
|
|
|
|
2012-04-15 05:58:06 +00:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-18 16:19:57 -08:00
|
|
|
|
2015-10-28 23:50:58 +01:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
|
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
|
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-23 14:35:23 -05:00
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
|
|
|
|
|
2012-05-23 14:35:23 -05:00
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2013-02-20 10:25:12 -06:00
|
|
|
|
2009-11-18 16:19:57 -08:00
|
|
|
|
2012-05-16 15:16:38 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-02-15 07:43:54 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-08 20:59:00 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-08 20:58:59 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2015-10-28 23:50:58 +01:00
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
|
|
|
|
|
2012-06-11 14:57:13 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
2013-03-08 13:35:36 -06:00
|
|
|
|
2013-03-06 23:39:38 -06:00
|
|
|
|
|
|
|
|
|
2013-03-08 13:35:36 -06:00
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
2010-04-06 15:01:27 -07:00
|
|
|
|
2015-10-19 21:59:00 +05:30
|
|
|
|
|
|
|
|
|
2013-03-06 23:39:38 -06:00
|
|
|
|
2015-06-25 20:32:34 +03:00
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
|
|
|
|
|
2013-03-29 11:44:10 -05:00
|
|
|
|
|
|
|
|
|
2017-05-19 11:38:17 +02:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2013-03-08 20:58:59 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-11 14:57:13 -05:00
|
|
|
|
2012-05-23 14:35:23 -05:00
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libceph: fix ceph_msg_revoke()
There are a number of problems with revoking a "was sending" message:
(1) We never make any attempt to revoke data - only kvecs contibute to
con->out_skip. However, once the header (envelope) is written to the
socket, our peer learns data_len and sets itself to expect at least
data_len bytes to follow front or front+middle. If ceph_msg_revoke()
is called while the messenger is sending message's data portion,
anything we send after that call is counted by the OSD towards the now
revoked message's data portion. The effects vary, the most common one
is the eventual hang - higher layers get stuck waiting for the reply to
the message that was sent out after ceph_msg_revoke() returned and
treated by the OSD as a bunch of data bytes. This is what Matt ran
into.
(2) Flat out zeroing con->out_kvec_bytes worth of bytes to handle kvecs
is wrong. If ceph_msg_revoke() is called before the tag is sent out or
while the messenger is sending the header, we will get a connection
reset, either due to a bad tag (0 is not a valid tag) or a bad header
CRC, which kind of defeats the purpose of revoke. Currently the kernel
client refuses to work with header CRCs disabled, but that will likely
change in the future, making this even worse.
(3) con->out_skip is not reset on connection reset, leading to one or
more spurious connection resets if we happen to get a real one between
con->out_skip is set in ceph_msg_revoke() and before it's cleared in
write_partial_skip().
Fixing (1) and (3) is trivial. The idea behind fixing (2) is to never
zero the tag or the header, i.e. send out tag+header regardless of when
ceph_msg_revoke() is called. That way the header is always correct, no
unnecessary resets are induced and revoke stands ready for disabled
CRCs. Since ceph_msg_revoke() rips out con->out_msg, introduce a new
"message out temp" and copy the header into it before sending.
Cc: stable@vger.kernel.org # 4.0+
Reported-by: Matt Conner <matt.conner@keepertech.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Matt Conner <matt.conner@keepertech.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-12-28 13:18:34 +03:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros
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: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-04-01 15:29:47 +03:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2013-03-06 23:39:38 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-10 14:34:36 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-25 08:47:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-01 17:19:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-10 10:29:50 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-05-10 10:29:50 -05:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-10 14:34:36 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-05-10 10:29:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2009-11-10 14:34:36 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2012-05-10 10:29:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2012-05-10 10:29:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2012-05-10 10:29:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2012-05-10 10:29:50 -05:00
|
|
|
|
2009-11-10 14:34:36 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-10 10:29:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-10 14:34:36 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-10 10:29:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2012-05-10 10:29:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-18 16:19:57 -08:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2009-11-18 16:19:57 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-10 14:34:36 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-09 16:36:34 -07:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-09 13:57:52 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2015-07-09 13:57:52 +03:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2015-07-09 13:57:52 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-04 11:46:35 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2009-11-04 11:46:35 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-12 15:34:24 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2011-05-12 15:34:24 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-23 11:48:42 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-23 15:49:27 -06:00
|
|
|
|
|
|
|
|
|
2011-09-23 11:48:42 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-23 11:48:42 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-08 09:54:52 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2011-09-23 11:48:42 -07:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2011-09-23 11:48:42 -07:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2010-07-08 09:54:52 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-30 19:21:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-08 09:54:52 -07:00
|
|
|
|
2011-09-23 11:48:42 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2009-11-10 14:34:36 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2009-11-10 14:34:36 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-03 15:17:56 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-07 16:12:36 -08:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2014-09-09 21:17:29 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-23 12:12:31 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-03 15:17:56 -08:00
|
|
|
|
2009-11-10 14:34:36 -08:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2009-11-10 14:34:36 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-28 23:50:58 +01:00
|
|
|
|
|
|
|
|
|
2017-06-05 14:44:59 +02:00
|
|
|
|
2011-05-19 11:21:05 -07:00
|
|
|
|
2009-12-23 09:30:21 -08:00
|
|
|
|
2009-11-10 14:34:36 -08:00
|
|
|
|
|
|
|
|
|
2016-12-02 16:35:09 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-12-02 16:35:09 +01:00
|
|
|
|
2016-12-02 16:35:09 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2009-12-23 09:30:21 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-12-23 09:30:21 -08:00
|
|
|
|
|
|
|
|
|
2012-12-27 20:27:04 -06:00
|
|
|
|
2009-12-23 09:30:21 -08:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-27 20:27:04 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2009-11-18 16:19:57 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libceph: avoid truncation due to racing banners
Because the Ceph client messenger uses a non-blocking connect, it is
possible for the sending of the client banner to race with the
arrival of the banner sent by the peer.
When ceph_sock_state_change() notices the connect has completed, it
schedules work to process the socket via con_work(). During this
time the peer is writing its banner, and arrival of the peer banner
races with con_work().
If con_work() calls try_read() before the peer banner arrives, there
is nothing for it to do, after which con_work() calls try_write() to
send the client's banner. In this case Ceph's protocol negotiation
can complete succesfully.
The server-side messenger immediately sends its banner and addresses
after accepting a connect request, *before* actually attempting to
read or verify the banner from the client. As a result, it is
possible for the banner from the server to arrive before con_work()
calls try_read(). If that happens, try_read() will read the banner
and prepare protocol negotiation info via prepare_write_connect().
prepare_write_connect() calls con_out_kvec_reset(), which discards
the as-yet-unsent client banner. Next, con_work() calls
try_write(), which sends the protocol negotiation info rather than
the banner that the peer is expecting.
The result is that the peer sees an invalid banner, and the client
reports "negotiation failed".
Fix this by moving con_out_kvec_reset() out of
prepare_write_connect() to its callers at all locations except the
one where the banner might still need to be sent.
[elder@inktak.com: added note about server-side behavior]
Signed-off-by: Jim Schutt <jaschut@sandia.gov>
Reviewed-by: Alex Elder <elder@inktank.com>
2012-08-10 10:37:38 -07:00
|
|
|
|
2012-05-16 15:16:38 -05:00
|
|
|
|
2011-05-19 11:21:05 -07:00
|
|
|
|
|
|
|
|
|
2010-03-15 15:47:22 -07:00
|
|
|
|
2009-11-18 16:19:57 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-10 11:53:34 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
libceph: avoid truncation due to racing banners
Because the Ceph client messenger uses a non-blocking connect, it is
possible for the sending of the client banner to race with the
arrival of the banner sent by the peer.
When ceph_sock_state_change() notices the connect has completed, it
schedules work to process the socket via con_work(). During this
time the peer is writing its banner, and arrival of the peer banner
races with con_work().
If con_work() calls try_read() before the peer banner arrives, there
is nothing for it to do, after which con_work() calls try_write() to
send the client's banner. In this case Ceph's protocol negotiation
can complete succesfully.
The server-side messenger immediately sends its banner and addresses
after accepting a connect request, *before* actually attempting to
read or verify the banner from the client. As a result, it is
possible for the banner from the server to arrive before con_work()
calls try_read(). If that happens, try_read() will read the banner
and prepare protocol negotiation info via prepare_write_connect().
prepare_write_connect() calls con_out_kvec_reset(), which discards
the as-yet-unsent client banner. Next, con_work() calls
try_write(), which sends the protocol negotiation info rather than
the banner that the peer is expecting.
The result is that the peer sees an invalid banner, and the client
reports "negotiation failed".
Fix this by moving con_out_kvec_reset() out of
prepare_write_connect() to its callers at all locations except the
one where the banner might still need to be sent.
[elder@inktak.com: added note about server-side behavior]
Signed-off-by: Jim Schutt <jaschut@sandia.gov>
Reviewed-by: Alex Elder <elder@inktank.com>
2012-08-10 10:37:38 -07:00
|
|
|
|
2012-05-16 21:51:59 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-22 10:43:42 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-22 10:43:42 -08:00
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
2011-05-19 11:21:05 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-10 11:53:34 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-07-10 11:53:34 -07:00
|
|
|
|
|
|
|
|
|
libceph: avoid truncation due to racing banners
Because the Ceph client messenger uses a non-blocking connect, it is
possible for the sending of the client banner to race with the
arrival of the banner sent by the peer.
When ceph_sock_state_change() notices the connect has completed, it
schedules work to process the socket via con_work(). During this
time the peer is writing its banner, and arrival of the peer banner
races with con_work().
If con_work() calls try_read() before the peer banner arrives, there
is nothing for it to do, after which con_work() calls try_write() to
send the client's banner. In this case Ceph's protocol negotiation
can complete succesfully.
The server-side messenger immediately sends its banner and addresses
after accepting a connect request, *before* actually attempting to
read or verify the banner from the client. As a result, it is
possible for the banner from the server to arrive before con_work()
calls try_read(). If that happens, try_read() will read the banner
and prepare protocol negotiation info via prepare_write_connect().
prepare_write_connect() calls con_out_kvec_reset(), which discards
the as-yet-unsent client banner. Next, con_work() calls
try_write(), which sends the protocol negotiation info rather than
the banner that the peer is expecting.
The result is that the peer sees an invalid banner, and the client
reports "negotiation failed".
Fix this by moving con_out_kvec_reset() out of
prepare_write_connect() to its callers at all locations except the
one where the banner might still need to be sent.
[elder@inktak.com: added note about server-side behavior]
Signed-off-by: Jim Schutt <jaschut@sandia.gov>
Reviewed-by: Alex Elder <elder@inktank.com>
2012-08-10 10:37:38 -07:00
|
|
|
|
2012-05-16 21:51:59 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-10 14:34:36 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-07-10 11:53:34 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-07-10 11:53:34 -07:00
|
|
|
|
libceph: avoid truncation due to racing banners
Because the Ceph client messenger uses a non-blocking connect, it is
possible for the sending of the client banner to race with the
arrival of the banner sent by the peer.
When ceph_sock_state_change() notices the connect has completed, it
schedules work to process the socket via con_work(). During this
time the peer is writing its banner, and arrival of the peer banner
races with con_work().
If con_work() calls try_read() before the peer banner arrives, there
is nothing for it to do, after which con_work() calls try_write() to
send the client's banner. In this case Ceph's protocol negotiation
can complete succesfully.
The server-side messenger immediately sends its banner and addresses
after accepting a connect request, *before* actually attempting to
read or verify the banner from the client. As a result, it is
possible for the banner from the server to arrive before con_work()
calls try_read(). If that happens, try_read() will read the banner
and prepare protocol negotiation info via prepare_write_connect().
prepare_write_connect() calls con_out_kvec_reset(), which discards
the as-yet-unsent client banner. Next, con_work() calls
try_write(), which sends the protocol negotiation info rather than
the banner that the peer is expecting.
The result is that the peer sees an invalid banner, and the client
reports "negotiation failed".
Fix this by moving con_out_kvec_reset() out of
prepare_write_connect() to its callers at all locations except the
one where the banner might still need to be sent.
[elder@inktak.com: added note about server-side behavior]
Signed-off-by: Jim Schutt <jaschut@sandia.gov>
Reviewed-by: Alex Elder <elder@inktank.com>
2012-08-10 10:37:38 -07:00
|
|
|
|
2012-05-16 21:51:59 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-25 08:47:40 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2009-12-23 09:30:21 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-12-23 09:30:21 -08:00
|
|
|
|
|
|
|
|
|
2012-12-27 20:27:04 -06:00
|
|
|
|
2009-12-23 09:30:21 -08:00
|
|
|
|
|
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
2012-12-26 10:43:57 -06:00
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
2013-03-25 09:30:13 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2010-05-12 15:23:30 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-14 14:56:56 -08:00
|
|
|
|
|
|
|
|
|
2013-02-20 10:25:12 -06:00
|
|
|
|
2009-12-14 14:56:56 -08:00
|
|
|
|
2012-07-30 16:22:05 -07:00
|
|
|
|
2009-12-14 14:56:56 -08:00
|
|
|
|
2013-03-25 08:47:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-12 15:33:17 -07:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-10 10:29:50 -05:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-05-10 10:29:50 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-05 18:47:37 +08:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2017-05-05 18:47:37 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-26 11:27:24 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2017-05-05 18:47:37 +08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
2010-08-03 10:25:11 -07:00
|
|
|
|
|
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
2010-04-06 15:01:27 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-02-15 07:43:54 -06:00
|
|
|
|
|
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-08 20:58:59 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2015-10-28 23:50:58 +01:00
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
2013-03-08 20:58:59 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
2013-03-08 20:58:59 -06:00
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
|
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
2015-10-19 21:59:00 +05:30
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
|
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
2017-05-19 11:38:17 +02:00
|
|
|
|
2013-03-08 20:58:59 -06:00
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
|
|
|
|
|
2013-03-08 20:58:59 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-11 23:34:23 -05:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-10 10:29:50 -05:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-04-15 05:58:06 +00:00
|
|
|
|
2015-10-28 23:50:58 +01:00
|
|
|
|
2014-11-04 16:33:37 +08:00
|
|
|
|
2010-04-22 07:47:01 -07:00
|
|
|
|
2012-02-15 07:43:54 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-10 10:29:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-10 10:29:50 -05:00
|
|
|
|
|
|
|
|
|
2012-02-15 07:43:54 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-23 14:52:40 +03:00
|
|
|
|
2012-02-15 07:43:54 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-08 18:51:03 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-22 07:47:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ceph: fix small seq message skipping
If the client gets out of sync with the server message sequence number, we
normally skip low seq messages (ones we already received). The skip code
was also incrementing the expected seq, such that all subsequent messages
also appeared old and got skipped, and an eventual timeout on the osd
connection. This resulted in some lagging requests and console messages
like
[233480.882885] ceph: skipping osd22 10.138.138.13:6804 seq 2016, expected 2017
[233480.882919] ceph: skipping osd22 10.138.138.13:6804 seq 2017, expected 2018
[233480.882963] ceph: skipping osd22 10.138.138.13:6804 seq 2018, expected 2019
[233480.883488] ceph: skipping osd22 10.138.138.13:6804 seq 2019, expected 2020
[233485.219558] ceph: skipping osd22 10.138.138.13:6804 seq 2020, expected 2021
[233485.906595] ceph: skipping osd22 10.138.138.13:6804 seq 2021, expected 2022
[233490.379536] ceph: skipping osd22 10.138.138.13:6804 seq 2022, expected 2023
[233495.523260] ceph: skipping osd22 10.138.138.13:6804 seq 2023, expected 2024
[233495.923194] ceph: skipping osd22 10.138.138.13:6804 seq 2024, expected 2025
[233500.534614] ceph: tid 6023602 timed out on osd22, will reset osd
Reported-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-01 15:49:23 -07:00
|
|
|
|
2010-04-22 07:47:01 -07:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2010-04-22 07:47:01 -07:00
|
|
|
|
|
|
|
|
|
2016-02-19 11:38:57 +01:00
|
|
|
|
2010-04-22 07:47:01 -07:00
|
|
|
|
2016-02-17 20:04:08 +01:00
|
|
|
|
2010-04-22 07:47:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-23 14:52:40 +03:00
|
|
|
|
2010-04-22 07:47:01 -07:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2012-07-30 18:19:30 -07:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2013-03-08 18:51:03 -06:00
|
|
|
|
2012-07-30 18:19:30 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
|
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-04-01 16:06:19 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2016-02-19 11:38:57 +01:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-04-21 20:45:59 -07:00
|
|
|
|
2016-02-17 20:04:08 +01:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
2012-07-30 18:19:30 -07:00
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
|
|
|
|
|
2010-01-11 10:32:02 -08:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2012-07-30 16:20:25 -07:00
|
|
|
|
2013-03-06 23:39:39 -06:00
|
|
|
|
2013-04-02 12:09:50 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
2010-08-03 10:25:11 -07:00
|
|
|
|
|
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-08 20:58:59 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-20 15:56:07 +01:00
|
|
|
|
2012-05-10 10:29:50 -05:00
|
|
|
|
|
|
|
|
|
2012-05-10 10:29:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-04 16:33:37 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-02-15 07:43:54 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-04 16:33:37 +08:00
|
|
|
|
2015-10-26 22:23:56 +01:00
|
|
|
|
2014-11-04 16:33:37 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-02 17:13:58 +01:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-25 15:45:38 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2009-12-22 10:43:42 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-25 15:45:38 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-22 10:43:42 -08:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2015-09-01 17:19:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-21 12:49:23 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-29 11:04:58 -05:00
|
|
|
|
2012-05-23 14:35:23 -05:00
|
|
|
|
2012-05-16 15:16:38 -05:00
|
|
|
|
2009-11-10 14:34:36 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2009-12-11 09:48:05 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-02-14 14:05:33 -06:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libceph: fix ceph_msg_revoke()
There are a number of problems with revoking a "was sending" message:
(1) We never make any attempt to revoke data - only kvecs contibute to
con->out_skip. However, once the header (envelope) is written to the
socket, our peer learns data_len and sets itself to expect at least
data_len bytes to follow front or front+middle. If ceph_msg_revoke()
is called while the messenger is sending message's data portion,
anything we send after that call is counted by the OSD towards the now
revoked message's data portion. The effects vary, the most common one
is the eventual hang - higher layers get stuck waiting for the reply to
the message that was sent out after ceph_msg_revoke() returned and
treated by the OSD as a bunch of data bytes. This is what Matt ran
into.
(2) Flat out zeroing con->out_kvec_bytes worth of bytes to handle kvecs
is wrong. If ceph_msg_revoke() is called before the tag is sent out or
while the messenger is sending the header, we will get a connection
reset, either due to a bad tag (0 is not a valid tag) or a bad header
CRC, which kind of defeats the purpose of revoke. Currently the kernel
client refuses to work with header CRCs disabled, but that will likely
change in the future, making this even worse.
(3) con->out_skip is not reset on connection reset, leading to one or
more spurious connection resets if we happen to get a real one between
con->out_skip is set in ceph_msg_revoke() and before it's cleared in
write_partial_skip().
Fixing (1) and (3) is trivial. The idea behind fixing (2) is to never
zero the tag or the header, i.e. send out tag+header regardless of when
ceph_msg_revoke() is called. That way the header is always correct, no
unnecessary resets are induced and revoke stands ready for disabled
CRCs. Since ceph_msg_revoke() rips out con->out_msg, introduce a new
"message out temp" and copy the header into it before sending.
Cc: stable@vger.kernel.org # 4.0+
Reported-by: Matt Conner <matt.conner@keepertech.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Matt Conner <matt.conner@keepertech.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-12-28 13:18:34 +03:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2011-01-25 08:19:34 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
libceph: fix ceph_msg_revoke()
There are a number of problems with revoking a "was sending" message:
(1) We never make any attempt to revoke data - only kvecs contibute to
con->out_skip. However, once the header (envelope) is written to the
socket, our peer learns data_len and sets itself to expect at least
data_len bytes to follow front or front+middle. If ceph_msg_revoke()
is called while the messenger is sending message's data portion,
anything we send after that call is counted by the OSD towards the now
revoked message's data portion. The effects vary, the most common one
is the eventual hang - higher layers get stuck waiting for the reply to
the message that was sent out after ceph_msg_revoke() returned and
treated by the OSD as a bunch of data bytes. This is what Matt ran
into.
(2) Flat out zeroing con->out_kvec_bytes worth of bytes to handle kvecs
is wrong. If ceph_msg_revoke() is called before the tag is sent out or
while the messenger is sending the header, we will get a connection
reset, either due to a bad tag (0 is not a valid tag) or a bad header
CRC, which kind of defeats the purpose of revoke. Currently the kernel
client refuses to work with header CRCs disabled, but that will likely
change in the future, making this even worse.
(3) con->out_skip is not reset on connection reset, leading to one or
more spurious connection resets if we happen to get a real one between
con->out_skip is set in ceph_msg_revoke() and before it's cleared in
write_partial_skip().
Fixing (1) and (3) is trivial. The idea behind fixing (2) is to never
zero the tag or the header, i.e. send out tag+header regardless of when
ceph_msg_revoke() is called. That way the header is always correct, no
unnecessary resets are induced and revoke stands ready for disabled
CRCs. Since ceph_msg_revoke() rips out con->out_msg, introduce a new
"message out temp" and copy the header into it before sending.
Cc: stable@vger.kernel.org # 4.0+
Reported-by: Matt Conner <matt.conner@keepertech.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Matt Conner <matt.conner@keepertech.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-12-28 13:18:34 +03:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2011-01-25 08:19:34 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-14 14:04:30 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-08 20:58:59 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-25 08:19:34 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2013-03-08 20:58:59 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2011-01-25 08:19:34 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-14 14:04:30 -08:00
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
2015-09-01 17:19:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-20 10:25:12 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-25 08:19:34 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2011-05-19 11:21:05 -07:00
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
2012-05-24 11:55:03 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-31 11:37:29 -05:00
|
|
|
|
2012-05-24 11:55:03 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
2012-05-24 11:55:03 -05:00
|
|
|
|
libceph: avoid truncation due to racing banners
Because the Ceph client messenger uses a non-blocking connect, it is
possible for the sending of the client banner to race with the
arrival of the banner sent by the peer.
When ceph_sock_state_change() notices the connect has completed, it
schedules work to process the socket via con_work(). During this
time the peer is writing its banner, and arrival of the peer banner
races with con_work().
If con_work() calls try_read() before the peer banner arrives, there
is nothing for it to do, after which con_work() calls try_write() to
send the client's banner. In this case Ceph's protocol negotiation
can complete succesfully.
The server-side messenger immediately sends its banner and addresses
after accepting a connect request, *before* actually attempting to
read or verify the banner from the client. As a result, it is
possible for the banner from the server to arrive before con_work()
calls try_read(). If that happens, try_read() will read the banner
and prepare protocol negotiation info via prepare_write_connect().
prepare_write_connect() calls con_out_kvec_reset(), which discards
the as-yet-unsent client banner. Next, con_work() calls
try_write(), which sends the protocol negotiation info rather than
the banner that the peer is expecting.
The result is that the peer sees an invalid banner, and the client
reports "negotiation failed".
Fix this by moving con_out_kvec_reset() out of
prepare_write_connect() to its callers at all locations except the
one where the banner might still need to be sent.
[elder@inktak.com: added note about server-side behavior]
Signed-off-by: Jim Schutt <jaschut@sandia.gov>
Reviewed-by: Alex Elder <elder@inktank.com>
2012-08-10 10:37:38 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-24 11:55:03 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-19 11:21:05 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
2012-05-24 11:55:03 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-25 08:17:48 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-26 10:43:57 -06:00
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-02-15 07:43:55 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-25 08:17:48 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-25 08:17:48 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-01 17:19:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
|
|
|
|
|
2011-01-25 08:17:48 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-28 23:52:06 +01:00
|
|
|
|
2015-03-23 14:52:40 +03:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2011-01-25 08:17:48 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2011-01-25 08:17:48 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2011-01-25 08:17:48 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-30 18:16:56 -07:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2013-03-25 08:47:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2011-01-25 08:17:48 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-01 17:19:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2011-01-25 08:17:48 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-08 20:37:30 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-10-08 20:37:30 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2012-10-08 20:37:30 -07:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2012-10-08 20:37:30 -07:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-10-08 20:37:30 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-10-08 20:37:30 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2014-06-24 16:21:45 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-07 19:50:07 -06:00
|
|
|
|
|
|
|
|
|
2013-02-20 10:25:12 -06:00
|
|
|
|
2012-12-07 19:50:07 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-09 21:17:29 -07:00
|
|
|
|
2012-12-07 19:50:07 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-19 12:25:57 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-19 12:25:57 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-13 14:32:57 +01:00
|
|
|
|
|
|
|
|
|
2013-02-19 12:25:57 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-13 14:32:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-19 12:25:57 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-03 15:44:41 +03:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-19 12:25:57 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-04-28 13:51:50 -07:00
|
|
|
|
2013-02-19 12:25:57 -06:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2013-02-19 12:25:57 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-19 11:21:05 -07:00
|
|
|
|
2013-02-19 12:25:57 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-23 14:52:40 +03:00
|
|
|
|
|
|
|
|
|
2013-02-19 12:25:57 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-23 14:52:40 +03:00
|
|
|
|
|
|
|
|
|
2013-02-19 12:25:57 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-30 16:24:21 -07:00
|
|
|
|
2013-02-19 12:25:57 -06:00
|
|
|
|
|
|
|
|
|
2010-04-28 13:51:50 -07:00
|
|
|
|
2011-05-19 11:21:05 -07:00
|
|
|
|
2013-02-19 12:25:57 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-19 12:25:57 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2015-03-23 14:52:40 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-26 10:43:57 -06:00
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
|
|
|
|
|
2009-12-22 10:43:42 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2009-12-14 14:30:34 -08:00
|
|
|
|
2013-02-20 10:25:12 -06:00
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
|
|
|
|
|
2013-02-19 12:25:57 -06:00
|
|
|
|
2012-07-20 15:22:53 -07:00
|
|
|
|
|
|
|
|
|
2009-12-14 14:30:34 -08:00
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
2009-12-14 14:30:34 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-02-25 12:40:45 -08:00
|
|
|
|
|
|
|
|
|
2010-02-02 16:21:06 -08:00
|
|
|
|
2011-03-03 10:10:15 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-20 10:25:12 -06:00
|
|
|
|
2011-03-04 12:25:05 -08:00
|
|
|
|
2013-02-20 10:25:12 -06:00
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
2010-02-25 12:40:45 -08:00
|
|
|
|
|
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
2010-02-25 12:40:45 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-20 10:25:12 -06:00
|
|
|
|
2012-10-08 20:37:30 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-26 23:26:43 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-05-26 23:26:43 -05:00
|
|
|
|
2015-10-28 23:50:58 +01:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-27 14:28:10 -08:00
|
|
|
|
2010-01-07 16:12:36 -08:00
|
|
|
|
2009-11-03 15:17:56 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-07-08 19:50:33 -07:00
|
|
|
|
2015-06-25 17:47:45 +03:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-05-26 23:26:43 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-05-26 23:26:43 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2015-06-25 17:47:45 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-02 17:13:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-04 12:25:05 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
2011-03-04 12:25:05 -08:00
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
2011-03-04 12:25:05 -08:00
|
|
|
|
2013-02-20 10:25:12 -06:00
|
|
|
|
|
|
|
|
|
2011-03-04 12:25:05 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-20 15:34:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-20 17:24:40 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2012-07-20 15:34:04 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-02 17:13:58 +01:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-20 15:33:04 -07:00
|
|
|
|
|
|
|
|
|
2009-12-22 10:43:42 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-20 10:25:12 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
|
|
|
|
|
2015-11-02 17:13:58 +01:00
|
|
|
|
|
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
2015-11-02 17:13:58 +01:00
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
2009-12-22 10:43:42 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-07-05 12:15:14 -07:00
|
|
|
|
|
|
|
|
|
libceph: fix ceph_msg_revoke()
There are a number of problems with revoking a "was sending" message:
(1) We never make any attempt to revoke data - only kvecs contibute to
con->out_skip. However, once the header (envelope) is written to the
socket, our peer learns data_len and sets itself to expect at least
data_len bytes to follow front or front+middle. If ceph_msg_revoke()
is called while the messenger is sending message's data portion,
anything we send after that call is counted by the OSD towards the now
revoked message's data portion. The effects vary, the most common one
is the eventual hang - higher layers get stuck waiting for the reply to
the message that was sent out after ceph_msg_revoke() returned and
treated by the OSD as a bunch of data bytes. This is what Matt ran
into.
(2) Flat out zeroing con->out_kvec_bytes worth of bytes to handle kvecs
is wrong. If ceph_msg_revoke() is called before the tag is sent out or
while the messenger is sending the header, we will get a connection
reset, either due to a bad tag (0 is not a valid tag) or a bad header
CRC, which kind of defeats the purpose of revoke. Currently the kernel
client refuses to work with header CRCs disabled, but that will likely
change in the future, making this even worse.
(3) con->out_skip is not reset on connection reset, leading to one or
more spurious connection resets if we happen to get a real one between
con->out_skip is set in ceph_msg_revoke() and before it's cleared in
write_partial_skip().
Fixing (1) and (3) is trivial. The idea behind fixing (2) is to never
zero the tag or the header, i.e. send out tag+header regardless of when
ceph_msg_revoke() is called. That way the header is always correct, no
unnecessary resets are induced and revoke stands ready for disabled
CRCs. Since ceph_msg_revoke() rips out con->out_msg, introduce a new
"message out temp" and copy the header into it before sending.
Cc: stable@vger.kernel.org # 4.0+
Reported-by: Matt Conner <matt.conner@keepertech.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Matt Conner <matt.conner@keepertech.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-12-28 13:18:34 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-20 15:56:07 +01:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
libceph: fix ceph_msg_revoke()
There are a number of problems with revoking a "was sending" message:
(1) We never make any attempt to revoke data - only kvecs contibute to
con->out_skip. However, once the header (envelope) is written to the
socket, our peer learns data_len and sets itself to expect at least
data_len bytes to follow front or front+middle. If ceph_msg_revoke()
is called while the messenger is sending message's data portion,
anything we send after that call is counted by the OSD towards the now
revoked message's data portion. The effects vary, the most common one
is the eventual hang - higher layers get stuck waiting for the reply to
the message that was sent out after ceph_msg_revoke() returned and
treated by the OSD as a bunch of data bytes. This is what Matt ran
into.
(2) Flat out zeroing con->out_kvec_bytes worth of bytes to handle kvecs
is wrong. If ceph_msg_revoke() is called before the tag is sent out or
while the messenger is sending the header, we will get a connection
reset, either due to a bad tag (0 is not a valid tag) or a bad header
CRC, which kind of defeats the purpose of revoke. Currently the kernel
client refuses to work with header CRCs disabled, but that will likely
change in the future, making this even worse.
(3) con->out_skip is not reset on connection reset, leading to one or
more spurious connection resets if we happen to get a real one between
con->out_skip is set in ceph_msg_revoke() and before it's cleared in
write_partial_skip().
Fixing (1) and (3) is trivial. The idea behind fixing (2) is to never
zero the tag or the header, i.e. send out tag+header regardless of when
ceph_msg_revoke() is called. That way the header is always correct, no
unnecessary resets are induced and revoke stands ready for disabled
CRCs. Since ceph_msg_revoke() rips out con->out_msg, introduce a new
"message out temp" and copy the header into it before sending.
Cc: stable@vger.kernel.org # 4.0+
Reported-by: Matt Conner <matt.conner@keepertech.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Matt Conner <matt.conner@keepertech.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-12-28 13:18:34 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libceph: have messages take a connection reference
There are essentially two types of ceph messages: incoming and
outgoing. Outgoing messages are always allocated via ceph_msg_new(),
and at the time of their allocation they are not associated with any
particular connection. Incoming messages are always allocated via
ceph_con_in_msg_alloc(), and they are initially associated with the
connection from which incoming data will be placed into the message.
When an outgoing message gets sent, it becomes associated with a
connection and remains that way until the message is successfully
sent. The association of an incoming message goes away at the point
it is sent to an upper layer via a con->ops->dispatch method.
This patch implements reference counting for all ceph messages, such
that every message holds a reference (and a pointer) to a connection
if and only if it is associated with that connection (as described
above).
For background, here is an explanation of the ceph message
lifecycle, emphasizing when an association exists between a message
and a connection.
Outgoing Messages
An outgoing message is "owned" by its allocator, from the time it is
allocated in ceph_msg_new() up to the point it gets queued for
sending in ceph_con_send(). Prior to that point the message's
msg->con pointer is null; at the point it is queued for sending its
message pointer is assigned to refer to the connection. At that
time the message is inserted into a connection's out_queue list.
When a message on the out_queue list has been sent to the socket
layer to be put on the wire, it is transferred out of that list and
into the connection's out_sent list. At that point it is still owned
by the connection, and will remain so until an acknowledgement is
received from the recipient that indicates the message was
successfully transferred. When such an acknowledgement is received
(in process_ack()), the message is removed from its list (in
ceph_msg_remove()), at which point it is no longer associated with
the connection.
So basically, any time a message is on one of a connection's lists,
it is associated with that connection. Reference counting outgoing
messages can thus be done at the points a message is added to the
out_queue (in ceph_con_send()) and the point it is removed from
either its two lists (in ceph_msg_remove())--at which point its
connection pointer becomes null.
Incoming Messages
When an incoming message on a connection is getting read (in
read_partial_message()) and there is no message in con->in_msg,
a new one is allocated using ceph_con_in_msg_alloc(). At that
point the message is associated with the connection. Once that
message has been completely and successfully read, it is passed to
upper layer code using the connection's con->ops->dispatch method.
At that point the association between the message and the connection
no longer exists.
Reference counting of connections for incoming messages can be done
by taking a reference to the connection when the message gets
allocated, and releasing that reference when it gets handed off
using the dispatch method.
We should never fail to get a connection reference for a
message--the since the caller should already hold one.
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2012-06-04 14:43:33 -05:00
|
|
|
|
libceph: fix ceph_msg_revoke()
There are a number of problems with revoking a "was sending" message:
(1) We never make any attempt to revoke data - only kvecs contibute to
con->out_skip. However, once the header (envelope) is written to the
socket, our peer learns data_len and sets itself to expect at least
data_len bytes to follow front or front+middle. If ceph_msg_revoke()
is called while the messenger is sending message's data portion,
anything we send after that call is counted by the OSD towards the now
revoked message's data portion. The effects vary, the most common one
is the eventual hang - higher layers get stuck waiting for the reply to
the message that was sent out after ceph_msg_revoke() returned and
treated by the OSD as a bunch of data bytes. This is what Matt ran
into.
(2) Flat out zeroing con->out_kvec_bytes worth of bytes to handle kvecs
is wrong. If ceph_msg_revoke() is called before the tag is sent out or
while the messenger is sending the header, we will get a connection
reset, either due to a bad tag (0 is not a valid tag) or a bad header
CRC, which kind of defeats the purpose of revoke. Currently the kernel
client refuses to work with header CRCs disabled, but that will likely
change in the future, making this even worse.
(3) con->out_skip is not reset on connection reset, leading to one or
more spurious connection resets if we happen to get a real one between
con->out_skip is set in ceph_msg_revoke() and before it's cleared in
write_partial_skip().
Fixing (1) and (3) is trivial. The idea behind fixing (2) is to never
zero the tag or the header, i.e. send out tag+header regardless of when
ceph_msg_revoke() is called. That way the header is always correct, no
unnecessary resets are induced and revoke stands ready for disabled
CRCs. Since ceph_msg_revoke() rips out con->out_msg, introduce a new
"message out temp" and copy the header into it before sending.
Cc: stable@vger.kernel.org # 4.0+
Reported-by: Matt Conner <matt.conner@keepertech.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Matt Conner <matt.conner@keepertech.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-12-28 13:18:34 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libceph: have messages take a connection reference
There are essentially two types of ceph messages: incoming and
outgoing. Outgoing messages are always allocated via ceph_msg_new(),
and at the time of their allocation they are not associated with any
particular connection. Incoming messages are always allocated via
ceph_con_in_msg_alloc(), and they are initially associated with the
connection from which incoming data will be placed into the message.
When an outgoing message gets sent, it becomes associated with a
connection and remains that way until the message is successfully
sent. The association of an incoming message goes away at the point
it is sent to an upper layer via a con->ops->dispatch method.
This patch implements reference counting for all ceph messages, such
that every message holds a reference (and a pointer) to a connection
if and only if it is associated with that connection (as described
above).
For background, here is an explanation of the ceph message
lifecycle, emphasizing when an association exists between a message
and a connection.
Outgoing Messages
An outgoing message is "owned" by its allocator, from the time it is
allocated in ceph_msg_new() up to the point it gets queued for
sending in ceph_con_send(). Prior to that point the message's
msg->con pointer is null; at the point it is queued for sending its
message pointer is assigned to refer to the connection. At that
time the message is inserted into a connection's out_queue list.
When a message on the out_queue list has been sent to the socket
layer to be put on the wire, it is transferred out of that list and
into the connection's out_sent list. At that point it is still owned
by the connection, and will remain so until an acknowledgement is
received from the recipient that indicates the message was
successfully transferred. When such an acknowledgement is received
(in process_ack()), the message is removed from its list (in
ceph_msg_remove()), at which point it is no longer associated with
the connection.
So basically, any time a message is on one of a connection's lists,
it is associated with that connection. Reference counting outgoing
messages can thus be done at the points a message is added to the
out_queue (in ceph_con_send()) and the point it is removed from
either its two lists (in ceph_msg_remove())--at which point its
connection pointer becomes null.
Incoming Messages
When an incoming message on a connection is getting read (in
read_partial_message()) and there is no message in con->in_msg,
a new one is allocated using ceph_con_in_msg_alloc(). At that
point the message is associated with the connection. Once that
message has been completely and successfully read, it is passed to
upper layer code using the connection's con->ops->dispatch method.
At that point the association between the message and the connection
no longer exists.
Reference counting of connections for incoming messages can be done
by taking a reference to the connection when the message gets
allocated, and releasing that reference when it gets handed off
using the dispatch method.
We should never fail to get a connection reference for a
message--the since the caller should already hold one.
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2012-06-04 14:43:33 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
libceph: fix ceph_msg_revoke()
There are a number of problems with revoking a "was sending" message:
(1) We never make any attempt to revoke data - only kvecs contibute to
con->out_skip. However, once the header (envelope) is written to the
socket, our peer learns data_len and sets itself to expect at least
data_len bytes to follow front or front+middle. If ceph_msg_revoke()
is called while the messenger is sending message's data portion,
anything we send after that call is counted by the OSD towards the now
revoked message's data portion. The effects vary, the most common one
is the eventual hang - higher layers get stuck waiting for the reply to
the message that was sent out after ceph_msg_revoke() returned and
treated by the OSD as a bunch of data bytes. This is what Matt ran
into.
(2) Flat out zeroing con->out_kvec_bytes worth of bytes to handle kvecs
is wrong. If ceph_msg_revoke() is called before the tag is sent out or
while the messenger is sending the header, we will get a connection
reset, either due to a bad tag (0 is not a valid tag) or a bad header
CRC, which kind of defeats the purpose of revoke. Currently the kernel
client refuses to work with header CRCs disabled, but that will likely
change in the future, making this even worse.
(3) con->out_skip is not reset on connection reset, leading to one or
more spurious connection resets if we happen to get a real one between
con->out_skip is set in ceph_msg_revoke() and before it's cleared in
write_partial_skip().
Fixing (1) and (3) is trivial. The idea behind fixing (2) is to never
zero the tag or the header, i.e. send out tag+header regardless of when
ceph_msg_revoke() is called. That way the header is always correct, no
unnecessary resets are induced and revoke stands ready for disabled
CRCs. Since ceph_msg_revoke() rips out con->out_msg, introduce a new
"message out temp" and copy the header into it before sending.
Cc: stable@vger.kernel.org # 4.0+
Reported-by: Matt Conner <matt.conner@keepertech.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Matt Conner <matt.conner@keepertech.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-12-28 13:18:34 +03:00
|
|
|
|
2009-12-22 10:43:42 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2009-12-22 10:45:45 -08:00
|
|
|
|
2010-01-13 17:03:23 -08:00
|
|
|
|
2009-12-22 10:45:45 -08:00
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
2009-12-22 10:45:45 -08:00
|
|
|
|
2015-11-02 17:13:58 +01:00
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
2015-11-02 17:13:58 +01:00
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-22 10:45:45 -08:00
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
2012-04-15 05:58:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-22 10:45:45 -08:00
|
|
|
|
|
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
|
|
|
|
|
2009-12-22 10:45:45 -08:00
|
|
|
|
2010-01-13 17:03:23 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-22 10:45:45 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-21 20:45:59 -07:00
|
|
|
|
2009-12-22 10:45:45 -08:00
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
|
|
|
|
|
2009-12-22 10:45:45 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-04 12:25:05 -08:00
|
|
|
|
2012-07-20 15:33:04 -07:00
|
|
|
|
2011-03-04 12:25:05 -08:00
|
|
|
|
2012-07-20 15:33:04 -07:00
|
|
|
|
2013-02-20 10:25:12 -06:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2015-09-01 17:19:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-08 15:59:19 -07:00
|
|
|
|
2015-09-01 17:19:38 +08:00
|
|
|
|
2017-05-08 15:59:19 -07:00
|
|
|
|
2015-09-01 17:19:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-11 23:34:24 -05:00
|
|
|
|
2013-03-01 18:00:16 -06:00
|
|
|
|
2013-03-11 23:34:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-01 12:43:04 -05:00
|
|
|
|
2017-07-17 11:13:35 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-03-11 23:34:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2014-09-16 17:50:45 +08:00
|
|
|
|
2013-03-11 23:34:24 -05:00
|
|
|
|
2013-05-01 12:43:04 -05:00
|
|
|
|
2013-03-01 18:00:16 -06:00
|
|
|
|
|
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2013-03-07 15:38:26 -06:00
|
|
|
|
2013-02-14 12:16:43 -06:00
|
|
|
|
2013-03-11 23:34:24 -05:00
|
|
|
|
|
|
|
|
|
2013-03-04 18:29:06 -06:00
|
|
|
|
|
|
|
|
|
2013-02-14 12:16:43 -06:00
|
|
|
|
2013-03-11 23:34:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
|
|
|
|
|
2013-02-14 12:16:43 -06:00
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2013-02-14 12:16:43 -06:00
|
|
|
|
|
|
|
|
|
2013-03-11 23:34:24 -05:00
|
|
|
|
|
|
|
|
|
2013-03-04 18:29:06 -06:00
|
|
|
|
|
|
|
|
|
2013-02-14 12:16:43 -06:00
|
|
|
|
2013-03-11 23:34:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
|
|
|
|
|
2013-02-14 12:16:43 -06:00
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2013-02-14 12:16:43 -06:00
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2013-02-14 12:16:43 -06:00
|
|
|
|
2013-03-11 23:34:24 -05:00
|
|
|
|
2013-02-14 12:16:43 -06:00
|
|
|
|
2013-03-11 23:34:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2013-03-11 23:34:24 -05:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
|
|
|
|
|
2013-02-14 12:16:43 -06:00
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2013-02-14 12:16:43 -06:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-09 15:03:46 -07:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-01 12:43:04 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2012-06-01 14:56:43 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-05-11 15:01:51 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2013-03-01 18:00:16 -06:00
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2011-05-03 02:29:56 +00:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2014-01-09 20:08:21 +02:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2011-08-09 15:03:46 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-09 20:08:21 +02:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-04-01 16:07:23 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-09 15:03:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-09 15:05:07 -07:00
|
|
|
|
2011-08-09 15:03:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-01 16:06:19 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-07 12:17:17 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
2012-06-04 14:43:32 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-30 18:19:30 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
2012-07-30 18:19:30 -07:00
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
2012-07-30 18:19:30 -07:00
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
2013-03-01 18:00:14 -06:00
|
|
|
|
2012-07-30 18:19:30 -07:00
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
2012-06-04 14:43:32 -05:00
|
|
|
|
2013-03-01 18:00:14 -06:00
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
2013-03-01 18:00:14 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-01 18:00:14 -06:00
|
|
|
|
2013-03-01 18:00:14 -06:00
|
|
|
|
|
|
|
|
|
2013-03-05 09:25:10 -06:00
|
|
|
|
|
|
|
|
|
2015-11-02 17:13:58 +01:00
|
|
|
|
2013-03-05 09:25:10 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-23 14:52:40 +03:00
|
|
|
|
2013-03-01 18:00:14 -06:00
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
2012-06-04 14:43:32 -05:00
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
2012-06-04 14:43:32 -05:00
|
|
|
|
|
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
2012-06-04 14:43:32 -05:00
|
|
|
|
|
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
|
|
|
|
|
2010-01-11 10:32:02 -08:00
|
|
|
|
2012-07-30 18:19:30 -07:00
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-20 14:14:41 +04:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2014-06-20 14:14:41 +04:00
|
|
|
|
2014-10-23 16:32:57 +04:00
|
|
|
|
2013-05-01 12:43:04 -05:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
|
|
|
|
|
2014-06-20 14:14:41 +04:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2009-12-07 15:55:05 -08:00
|
|
|
|
2015-12-18 23:33:30 +08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2014-06-20 14:14:41 +04:00
|
|
|
|
2009-12-07 15:55:05 -08:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2015-11-02 17:13:58 +01:00
|
|
|
|
|
|
|
|
|
2009-12-07 15:55:05 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2015-12-18 23:33:30 +08:00
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:06 -05:00
|
|
|
|
2009-12-23 12:12:31 -08:00
|
|
|
|
2009-12-07 15:55:05 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-20 14:14:41 +04:00
|
|
|
|
2009-10-06 11:31:13 -07:00
|
|
|
|
2014-06-20 14:14:41 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-14 17:29:48 +01:00
|
|
|
|
2014-06-20 14:14:41 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-14 17:29:48 +01:00
|
|
|
|
2014-06-20 14:14:41 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-14 15:13:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-09 20:08:21 +02:00
|
|
|
|
|
|
|
|
|
2009-12-14 15:13:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|