From: Dan Aloni <dan@kernelim.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Christoph Hellwig <hch@lst.de>,
Kent Overstreet <kent.overstreet@gmail.com>,
Ming Lin <ming.l@ssi.samsung.com>, Jens Axboe <axboe@fb.com>,
"Artem S. Tashkinov" <t.artem@mailcity.com>,
Steven Whitehouse <swhiteho@redhat.com>,
Tejun Heo <tj@kernel.org>, IDE-ML <linux-ide@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: IO errors after "block: remove bio_get_nr_vecs()"
Date: Mon, 21 Dec 2015 13:21:09 +0200 [thread overview]
Message-ID: <20151221112109.GA24782@gmail.com> (raw)
In-Reply-To: <CA+55aFzVEUnfVNwSUtW3xsSOC6GDvGvE-scUasejA0G5BTi1AA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 497 bytes --]
On Sun, Dec 20, 2015 at 10:41:44AM -0800, Linus Torvalds wrote:
>[..]
> Sadly, without CONFIG_LOCALVERSION_AUTO, there's no way to match up
> the dmesg files (in the same bisection tar-file as the bisection log)
> with the actual versions.
Perhaps we can print the Git revision in a manner independent of
CONFIG_LOCALVERSION_AUTO, using the attached patch. It will be emitted
in the dmesg Linux banner (though not in /proc/version, that's more
interface-ish and may break things).
--
Dan Aloni
[-- Attachment #2: 0001-init-version.c-add-SCM_REVISION.patch --]
[-- Type: text/plain, Size: 3368 bytes --]
>From d2d4ab995911e59ba41153fade176ca805ca2db8 Mon Sep 17 00:00:00 2001
From: Dan Aloni <dan@kernelim.com>
Date: Mon, 21 Dec 2015 11:54:18 +0200
Subject: [PATCH] init/version.c: add SCM revision
This adds a 'SCM-*' string to the Linux banner if and only if
source control information was available during the compilation
(such in the case of a Git bisect).
---
Documentation/dontdiff | 1 +
Makefile | 11 +++++++++++
init/version.c | 4 +++-
scripts/setlocalversion | 9 +++++++++
4 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/Documentation/dontdiff b/Documentation/dontdiff
index 8ea834f6b289..3dfda8883b7a 100644
--- a/Documentation/dontdiff
+++ b/Documentation/dontdiff
@@ -227,6 +227,7 @@ timeconst.h
times.h*
trix_boot.h
utsrelease.h*
+scmrevision.h*
vdso-syms.lds
vdso.lds
vdso32-int80-syms.lds
diff --git a/Makefile b/Makefile
index 4e2b18d56091..f966be40dafd 100644
--- a/Makefile
+++ b/Makefile
@@ -977,6 +977,7 @@ endif
prepare2: prepare3 outputmakefile asm-generic
prepare1: prepare2 $(version_h) include/generated/utsrelease.h \
+ include/generated/scmrevision.h \
include/config/auto.conf
$(cmd_crmodverdir)
@@ -1003,6 +1004,13 @@ define filechk_utsrelease.h
(echo \#define UTS_RELEASE \"$(KERNELRELEASE)\";)
endef
+define filechk_scmrevision.h
+ (SCMREV=`./scripts/setlocalversion --only-print`; \
+ if [ "x$$SCMREV" = "x" ] ; \
+ then echo \#define KERNEL_SCM_REVISION \"\" ; \
+ else echo \#define KERNEL_SCM_REVISION \" SCM$$SCMREV\"; fi )
+endef
+
define filechk_version.h
(echo \#define LINUX_VERSION_CODE $(shell \
expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL)); \
@@ -1016,6 +1024,9 @@ $(version_h): $(srctree)/Makefile FORCE
include/generated/utsrelease.h: include/config/kernel.release FORCE
$(call filechk,utsrelease.h)
+include/generated/scmrevision.h: include/config/kernel.release FORCE
+ $(call filechk,scmrevision.h)
+
PHONY += headerdep
headerdep:
$(Q)find $(srctree)/include/ -name '*.h' | xargs --max-args 1 \
diff --git a/init/version.c b/init/version.c
index fe41a63efed6..f9df083db7c8 100644
--- a/init/version.c
+++ b/init/version.c
@@ -11,6 +11,7 @@
#include <linux/uts.h>
#include <linux/utsname.h>
#include <generated/utsrelease.h>
+#include <generated/scmrevision.h>
#include <linux/version.h>
#include <linux/proc_ns.h>
@@ -45,7 +46,8 @@ EXPORT_SYMBOL_GPL(init_uts_ns);
/* FIXED STRINGS! Don't touch! */
const char linux_banner[] =
"Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
- LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
+ LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION
+ KERNEL_SCM_REVISION "\n";
const char linux_proc_banner[] =
"%s version %s"
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 63d91e22ed7c..be6a4cc6c348 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -20,6 +20,10 @@ if test "$1" = "--save-scmversion"; then
scm_only=true
shift
fi
+if test "$1" = "--only-print"; then
+ onlyprint=true
+ shift
+fi
if test $# -gt 0; then
srctree=$1
shift
@@ -132,6 +136,11 @@ collect_files()
echo "$res"
}
+if $only_print; then
+ scm_version
+ exit
+fi
+
if $scm_only; then
if test ! -e .scmversion; then
res=$(scm_version)
--
2.4.3
next prev parent reply other threads:[~2015-12-21 11:21 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-20 17:51 IO errors after "block: remove bio_get_nr_vecs()" Linus Torvalds
2015-12-20 18:18 ` Christoph Hellwig
2015-12-20 18:41 ` Linus Torvalds
2015-12-20 23:36 ` Artem S. Tashkinov
2015-12-21 11:21 ` Dan Aloni [this message]
2015-12-20 18:44 ` Kent Overstreet
2015-12-20 23:41 ` Artem S. Tashkinov
2015-12-20 23:25 ` Artem S. Tashkinov
2015-12-20 23:42 ` Kent Overstreet
2015-12-20 23:49 ` Artem S. Tashkinov
2015-12-20 23:23 ` Artem S. Tashkinov
2015-12-21 1:38 ` Ming Lei
2015-12-21 1:50 ` Artem S. Tashkinov
2015-12-21 2:18 ` Ming Lei
2015-12-21 2:25 ` Artem S. Tashkinov
2015-12-21 2:32 ` Kent Overstreet
2015-12-21 3:21 ` Ming Lei
2015-12-21 3:36 ` Artem S. Tashkinov
2015-12-21 4:32 ` Linus Torvalds
2015-12-21 4:43 ` Artem S. Tashkinov
2015-12-21 4:47 ` Linus Torvalds
2015-12-21 5:23 ` Linus Torvalds
2015-12-21 7:31 ` Artem S. Tashkinov
2015-12-22 4:06 ` Artem S. Tashkinov
2015-12-21 4:26 ` Tejun Heo
2015-12-21 5:10 ` Linus Torvalds
2015-12-21 6:55 ` Tejun Heo
2015-12-21 7:25 ` Artem S. Tashkinov
2015-12-21 19:35 ` Tejun Heo
2015-12-21 20:07 ` Tejun Heo
2015-12-21 21:08 ` Tejun Heo
2015-12-22 3:43 ` Kent Overstreet
2015-12-22 3:59 ` Kent Overstreet
2015-12-22 5:26 ` Junichi Nomura
2015-12-22 5:37 ` Kent Overstreet
2015-12-22 5:38 ` Kent Overstreet
2015-12-22 5:52 ` Artem S. Tashkinov
2015-12-22 5:55 ` Kent Overstreet
2015-12-22 5:59 ` Artem S. Tashkinov
2015-12-22 6:02 ` Kent Overstreet
2015-12-22 17:28 ` Jens Axboe
2015-12-22 4:45 ` Kent Overstreet
2015-12-22 5:10 ` Artem S. Tashkinov
2015-12-22 5:20 ` Artem S. Tashkinov
2015-12-21 22:51 ` Ming Lei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151221112109.GA24782@gmail.com \
--to=dan@kernelim.com \
--cc=axboe@fb.com \
--cc=hch@lst.de \
--cc=kent.overstreet@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.l@ssi.samsung.com \
--cc=swhiteho@redhat.com \
--cc=t.artem@mailcity.com \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.