From: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
To: Tony Luck <tony.luck@gmail.com>
Cc: "linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>,
"paulus@samba.org" <paulus@samba.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"keescook@chromium.org" <keescook@chromium.org>
Subject: Re: [PATCH 00/11] Add compression support to pstore
Date: Mon, 05 Aug 2013 22:40:35 +0530 [thread overview]
Message-ID: <51FFDC8B.7010909@linux.vnet.ibm.com> (raw)
In-Reply-To: <CA+8MBbJ7x46FGC7dPSdNzf8z=fZz20w1kiNgnZr4QQB6SUELhg@mail.gmail.com>
Hi Tony,
Thank you very much for testing my patches.
On Saturday 03 August 2013 03:42 AM, Tony Luck wrote:
> A quick experiment to use your patchset - but with compression
> disabled by tweaking this line in pstore_dump():
>
> zipped_len = -1; //zip_data(dst, hsize + len);
>
> turned out well. This kernel dumps uncompressed dmesg blobs into pstore
> and gets them back out again. So it seems likely that the problems are
> someplace in the compression/decompression code.
A quick look on my code suggests that problem could be in this part
of code.
In pstore_dump:
if (zipped_len < 0) {
dst = psinfo->buf;
hsize = sprintf(dst, "%s#%d Part%d\n",
why, oopscount, part);
size = psinfo->bufsize - hsize;
dst += hsize;
compressed = false;
if (!kmsg_dump_get_buffer(dumper, true, dst,
size, &len))
break;
} else {
compressed = true;
---> len = zipped_len;
}
I am returning zipped_len as the length of the compressed data (which also
has hsize compressed). So returning hsize + len in pstore_write callback
will be wrong. It should just have been zipped_len. This might be adding
junk characters.
Can you please replace this hunk with:
if (zipped_len < 0) {
pr_err("Compression failed\n");
dst = psinfo->buf;
hsize = sprintf(dst, "%s#%d Part%d\n",
why, oopscount, part);
size = psinfo->bufsize - hsize;
dst += hsize;
compressed = false;
if (!kmsg_dump_get_buffer(dumper, true, dst,
size, &len))
break;
total_len = hsize + len;
} else {
compressed = true;
total_len = zipped_len;
}
ret = psinfo->write(PSTORE_TYPE_DMESG, reason, &id, part,
oopscount, compressed, total_len, psinfo);
if (ret == 0 && reason == KMSG_DUMP_OOPS && pstore_is_mounted())
pstore_new_entry = 1;
total += total_len;
part++;
With the above hunk, atleast I dont see junk characters at the end in power.
I apologise, since I do not have the suitable machine to test this I am
not able to reproduce the scenarios you are stating. I need your help
in testing this.
- Aruna
> -Tony
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
WARNING: multiple messages have this Message-ID (diff)
From: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
To: Tony Luck <tony.luck@gmail.com>
Cc: "linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>,
"paulus@samba.org" <paulus@samba.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"benh@kernel.crashing.org" <benh@kernel.crashing.org>,
"keescook@chromium.org" <keescook@chromium.org>
Subject: Re: [PATCH 00/11] Add compression support to pstore
Date: Mon, 05 Aug 2013 22:40:35 +0530 [thread overview]
Message-ID: <51FFDC8B.7010909@linux.vnet.ibm.com> (raw)
In-Reply-To: <CA+8MBbJ7x46FGC7dPSdNzf8z=fZz20w1kiNgnZr4QQB6SUELhg@mail.gmail.com>
Hi Tony,
Thank you very much for testing my patches.
On Saturday 03 August 2013 03:42 AM, Tony Luck wrote:
> A quick experiment to use your patchset - but with compression
> disabled by tweaking this line in pstore_dump():
>
> zipped_len = -1; //zip_data(dst, hsize + len);
>
> turned out well. This kernel dumps uncompressed dmesg blobs into pstore
> and gets them back out again. So it seems likely that the problems are
> someplace in the compression/decompression code.
A quick look on my code suggests that problem could be in this part
of code.
In pstore_dump:
if (zipped_len < 0) {
dst = psinfo->buf;
hsize = sprintf(dst, "%s#%d Part%d\n",
why, oopscount, part);
size = psinfo->bufsize - hsize;
dst += hsize;
compressed = false;
if (!kmsg_dump_get_buffer(dumper, true, dst,
size, &len))
break;
} else {
compressed = true;
---> len = zipped_len;
}
I am returning zipped_len as the length of the compressed data (which also
has hsize compressed). So returning hsize + len in pstore_write callback
will be wrong. It should just have been zipped_len. This might be adding
junk characters.
Can you please replace this hunk with:
if (zipped_len < 0) {
pr_err("Compression failed\n");
dst = psinfo->buf;
hsize = sprintf(dst, "%s#%d Part%d\n",
why, oopscount, part);
size = psinfo->bufsize - hsize;
dst += hsize;
compressed = false;
if (!kmsg_dump_get_buffer(dumper, true, dst,
size, &len))
break;
total_len = hsize + len;
} else {
compressed = true;
total_len = zipped_len;
}
ret = psinfo->write(PSTORE_TYPE_DMESG, reason, &id, part,
oopscount, compressed, total_len, psinfo);
if (ret == 0 && reason == KMSG_DUMP_OOPS && pstore_is_mounted())
pstore_new_entry = 1;
total += total_len;
part++;
With the above hunk, atleast I dont see junk characters at the end in power.
I apologise, since I do not have the suitable machine to test this I am
not able to reproduce the scenarios you are stating. I need your help
in testing this.
- Aruna
> -Tony
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
next prev parent reply other threads:[~2013-08-05 17:10 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-15 16:55 [PATCH 00/11] Add compression support to pstore Aruna Balakrishnaiah
2013-07-15 16:55 ` Aruna Balakrishnaiah
2013-07-15 16:55 ` [PATCH 01/11] powerpc/pseries: Remove (de)compression in nvram with pstore enabled Aruna Balakrishnaiah
2013-07-15 16:55 ` Aruna Balakrishnaiah
2013-07-15 16:55 ` [PATCH 02/11] pstore: Add new argument 'compressed' in pstore write callback Aruna Balakrishnaiah
2013-07-15 16:55 ` Aruna Balakrishnaiah
2013-07-15 16:55 ` [PATCH 03/11] pstore/Kconfig: Select ZLIB_DEFLATE and ZLIB_INFLATE when PSTORE is selected Aruna Balakrishnaiah
2013-07-15 16:55 ` Aruna Balakrishnaiah
2013-07-15 16:55 ` [PATCH 04/11] pstore: Add compression support to pstore Aruna Balakrishnaiah
2013-07-15 16:55 ` Aruna Balakrishnaiah
2013-07-15 16:55 ` [PATCH 05/11] pstore: Introduce new argument 'compressed' in the read callback Aruna Balakrishnaiah
2013-07-15 16:55 ` Aruna Balakrishnaiah
2013-07-15 16:56 ` [PATCH 06/11] pstore: Provide decompression support to pstore Aruna Balakrishnaiah
2013-07-15 16:56 ` Aruna Balakrishnaiah
2013-07-15 16:56 ` [PATCH 07/11] pstore: Add file extension to pstore file if compressed Aruna Balakrishnaiah
2013-07-15 16:56 ` Aruna Balakrishnaiah
2013-07-15 16:56 ` [PATCH 08/11] powerpc/pseries: Read and write to the 'compressed' flag of pstore Aruna Balakrishnaiah
2013-07-15 16:56 ` Aruna Balakrishnaiah
2013-07-15 16:56 ` [PATCH 09/11] erst: " Aruna Balakrishnaiah
2013-07-15 16:56 ` Aruna Balakrishnaiah
2013-07-15 16:56 ` [PATCH 10/11] efi-pstore: " Aruna Balakrishnaiah
2013-07-15 16:56 ` Aruna Balakrishnaiah
2013-07-15 16:57 ` [PATCH 11/11] pstore/ram: " Aruna Balakrishnaiah
2013-07-15 16:57 ` Aruna Balakrishnaiah
2013-08-01 10:40 ` [PATCH 00/11] Add compression support to pstore Aruna Balakrishnaiah
2013-08-01 10:40 ` Aruna Balakrishnaiah
2013-08-01 23:42 ` Luck, Tony
2013-08-01 23:42 ` Luck, Tony
2013-08-02 21:39 ` Tony Luck
2013-08-02 21:39 ` Tony Luck
2013-08-02 22:12 ` Tony Luck
2013-08-05 16:41 ` Tony Luck
2013-08-05 17:10 ` Aruna Balakrishnaiah [this message]
2013-08-05 17:10 ` Aruna Balakrishnaiah
2013-08-05 18:22 ` Tony Luck
2013-08-05 18:22 ` Tony Luck
2013-08-05 19:41 ` Aruna Balakrishnaiah
2013-08-05 19:41 ` Aruna Balakrishnaiah
2013-08-05 21:20 ` Tony Luck
2013-08-05 21:20 ` Tony Luck
2013-08-06 23:36 ` Tony Luck
2013-08-06 23:36 ` Tony Luck
2013-08-07 1:58 ` Aruna Balakrishnaiah
2013-08-07 1:58 ` Aruna Balakrishnaiah
2013-08-07 3:25 ` Tony Luck
2013-08-07 3:25 ` Tony Luck
2013-08-07 5:13 ` Aruna Balakrishnaiah
2013-08-07 5:13 ` Aruna Balakrishnaiah
2013-08-07 5:35 ` Tony Luck
2013-08-07 5:35 ` Tony Luck
2013-08-07 17:30 ` Tony Luck
2013-08-07 17:30 ` Tony Luck
2013-08-08 4:29 ` Aruna Balakrishnaiah
2013-08-08 5:05 ` Tony Luck
2013-08-07 22:22 ` Tony Luck
2013-08-07 22:22 ` Tony Luck
2013-08-08 4:08 ` Aruna Balakrishnaiah
2013-08-08 4:08 ` Aruna Balakrishnaiah
2013-08-09 10:13 ` Aruna Balakrishnaiah
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=51FFDC8B.7010909@linux.vnet.ibm.com \
--to=aruna@linux.vnet.ibm.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=tony.luck@gmail.com \
/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.