From: Donald Douwsma <ddouwsma@redhat.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 3/3] xfsrestore: untangle inventory unpacking logic
Date: Thu, 29 Sep 2022 09:12:48 +1000 [thread overview]
Message-ID: <4a2690eb-af8a-2c32-3afe-1f24429bd2dd@redhat.com> (raw)
In-Reply-To: <YzRnIKSjxuDEcG8V@magnolia>
On 29/09/2022 01:24, Darrick J. Wong wrote:
> On Wed, Sep 28, 2022 at 03:53:07PM +1000, Donald Douwsma wrote:
>> stobj_unpack_sessinfo returns bool_t, fix logic in pi_addfile so errors
>> can be properly reported.
>>
>> signed-off-by: Donald Douwsma <ddouwsma@redhat.com>
>
> ^ Needs correct capitalisation.
>
> With that fixed,
> Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Will fix for all three patches.
Thanks again,
Don
>
>> ---
>> restore/content.c | 13 +++++--------
>> 1 file changed, 5 insertions(+), 8 deletions(-)
>>
>> diff --git a/restore/content.c b/restore/content.c
>> index b3999f9..04b6f81 100644
>> --- a/restore/content.c
>> +++ b/restore/content.c
>> @@ -5463,17 +5463,14 @@ pi_addfile(Media_t *Mediap,
>> * desc.
>> */
>> sessp = 0;
>> - if (!buflen) {
>> - ok = BOOL_FALSE;
>> - } else {
>> - /* extract the session information from the buffer */
>> - if (stobj_unpack_sessinfo(bufp, buflen, &sessinfo)<0) {
>> - ok = BOOL_FALSE;
>> - } else {
>> + ok = BOOL_FALSE;
>> + /* extract the session information from the buffer */
>> + if (buflen &&
>> + stobj_unpack_sessinfo(bufp, buflen, &sessinfo)) {
>> stobj_convert_sessinfo(&sessp, &sessinfo);
>> ok = BOOL_TRUE;
>> - }
>> }
>> +
>> if (!ok || !sessp) {
>> mlog(MLOG_DEBUG | MLOG_WARNING | MLOG_MEDIA, _(
>> "on-media session "
>> --
>> 2.31.1
>>
>
prev parent reply other threads:[~2022-09-28 23:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-28 5:53 [PATCH v2 0/3] xfsrestore: fix inventory unpacking Donald Douwsma
2022-09-28 5:53 ` [PATCH 1/3] " Donald Douwsma
2022-09-28 15:12 ` Darrick J. Wong
2022-09-28 23:02 ` Donald Douwsma
2022-09-28 5:53 ` [PATCH 2/3] xfsrestore: stobj_unpack_sessinfo cleanup Donald Douwsma
2022-09-28 15:23 ` Darrick J. Wong
2022-09-28 23:12 ` Donald Douwsma
2022-09-28 23:28 ` Donald Douwsma
2022-09-29 18:01 ` Darrick J. Wong
2022-10-06 4:43 ` Donald Douwsma
2022-09-28 5:53 ` [PATCH 3/3] xfsrestore: untangle inventory unpacking logic Donald Douwsma
2022-09-28 15:24 ` Darrick J. Wong
2022-09-28 23:12 ` Donald Douwsma [this message]
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=4a2690eb-af8a-2c32-3afe-1f24429bd2dd@redhat.com \
--to=ddouwsma@redhat.com \
--cc=djwong@kernel.org \
--cc=linux-xfs@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).