From: David Sterba <dsterba@suse.cz>
To: Zaslonko Mikhail <zaslonko@linux.ibm.com>
Cc: Josef Bacik <josef@toxicpanda.com>,
Andrew Morton <akpm@linux-foundation.org>,
Chris Mason <clm@fb.com>, David Sterba <dsterba@suse.com>,
Richard Purdie <rpurdie@rpsys.net>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Eduard Shishkin <edward6@linux.ibm.com>,
Ilya Leoshkevich <iii@linux.ibm.com>,
linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] btrfs: Use larger zlib buffer for s390 hardware compression
Date: Tue, 14 Jan 2020 17:19:31 +0100 [thread overview]
Message-ID: <20200114161931.GE3929@suse.cz> (raw)
In-Reply-To: <62a53ff3-a515-8801-d58b-b518dbe0c55c@linux.ibm.com>
On Mon, Jan 13, 2020 at 11:03:29AM +0100, Zaslonko Mikhail wrote:
> Hello David,
>
> On 09.01.2020 02:10, David Sterba wrote:
> > On Wed, Jan 08, 2020 at 07:48:31PM +0100, Zaslonko Mikhail wrote:
> >>>> + } else if (workspace->strm.avail_out == 0) {
> >>>> + /* get another page for the stream end */
> >>>> + kunmap(out_page);
> >>>> + if (nr_pages == nr_dest_pages) {
> >>>> + out_page = NULL;
> >>>> + ret = -E2BIG;
> >>>> + goto out;
> >>>> + }
> >>>> + out_page = alloc_page(GFP_NOFS | __GFP_HIGHMEM);
> >>>> + if (out_page == NULL) {
> >>>> + ret = -ENOMEM;
> >>>> + goto out;
> >>>> + }
> >>>
> >>> Do we need zlib_deflateEnd() for the above error cases? Thanks,
> >>
> >> The original btrfs code did not call zlib_deflateEnd() for -E2BIG and
> >> -ENOMEM cases, so I stick to the same logic.
> >> Unlike userspace zlib where deflateEnd() frees all dynamically allocated
> >> memory, in the kernel it doesn't do much apart from setting the return
> >> code (since all the memory allocations for kernel zlib are performed in advance).
> >
> > Agreed, deflateEnd is not necessary in the error cases.
>
> Can I consider this as 'Acked-by' from your side?
Yes, I also sent rev-by to the patch.
next prev parent reply other threads:[~2020-01-14 16:19 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-03 22:33 [PATCH v3 0/6] S390 hardware support for kernel zlib Mikhail Zaslonko
2020-01-03 22:33 ` [PATCH v3 1/6] lib/zlib: Add s390 hardware support for kernel zlib_deflate Mikhail Zaslonko
2020-01-03 22:33 ` [PATCH v3 2/6] s390/boot: Rename HEAP_SIZE due to name collision Mikhail Zaslonko
2020-01-07 14:50 ` Christian Borntraeger
2020-01-03 22:33 ` [PATCH v3 3/6] lib/zlib: Add s390 hardware support for kernel zlib_inflate Mikhail Zaslonko
2020-01-03 22:33 ` [PATCH v3 4/6] s390/boot: Add dfltcc= kernel command line parameter Mikhail Zaslonko
2020-01-03 22:33 ` [PATCH v3 5/6] lib/zlib: Add zlib_deflate_dfltcc_enabled() function Mikhail Zaslonko
2020-01-03 22:33 ` [PATCH v3 6/6] btrfs: Use larger zlib buffer for s390 hardware compression Mikhail Zaslonko
2020-01-06 16:40 ` Josef Bacik
2020-01-07 10:30 ` Zaslonko Mikhail
2020-01-06 18:43 ` David Sterba
2020-01-07 0:18 ` Eduard Shishkin
2020-01-07 14:30 ` David Sterba
2020-01-08 10:51 ` [PATCH v4] " Mikhail Zaslonko
2020-01-08 15:08 ` Josef Bacik
2020-01-08 18:48 ` Zaslonko Mikhail
2020-01-09 1:10 ` David Sterba
2020-01-13 10:03 ` Zaslonko Mikhail
2020-01-14 16:19 ` David Sterba [this message]
2020-01-14 16:18 ` David Sterba
2020-01-15 9:54 ` Fwd: " Zaslonko Mikhail
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=20200114161931.GE3929@suse.cz \
--to=dsterba@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=borntraeger@de.ibm.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=edward6@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=iii@linux.ibm.com \
--cc=josef@toxicpanda.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=rpurdie@rpsys.net \
--cc=zaslonko@linux.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox