From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Seunguk Shin <seunguk.shin@samsung.com>
Cc: "'Martin K. Petersen'" <martin.petersen@oracle.com>,
neilb@suse.de, linux-raid@vger.kernel.org
Subject: Re: [PATCH] raid0: data corruption when using trim
Date: Tue, 21 Jul 2015 00:55:28 -0400 [thread overview]
Message-ID: <yq1wpxu154v.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <005601d0c36c$59d28ec0$0d77ac40$@samsung.com> (Seunguk Shin's message of "Tue, 21 Jul 2015 13:18:52 +0900")
>>>>> "Seunguk" == Seunguk Shin <seunguk.shin@samsung.com> writes:
Seunguk,
Seunguk> The function bio_split says "The newly allocated bio will point
Seunguk> to @bio's bi_io_vec; it is the caller's responsibility to
Seunguk> ensure that @bio is not freed before the split." in its
Seunguk> comments.
I already put an explanatory comment above the cloning code. But I'll
elaborate in the function description as well.
Seunguk> I'm not sure whether some caller uses this limitation or not,
Seunguk> so I modifid the raid function.
We generally make sure our generic functions handle non-read/write
commands correctly so that callers do not have to keep track of internal
block layer implementation details/idiosyncrasies.
bio_split() exists mainly to provide linear/raid0/raid10 with a fast
path for reads and writes. But the function needs to be able to fall
back to a full clone in the discard case. The mutable bio_vec
requirement is purely an artifact of how things are implemented further
down the stack. MD should not have to deal with that.
Seunguk> The patch you shared has no problem, I think. I'll test it and
Seunguk> share the result.
That would be much appreciated!
Thanks,
Martin
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2015-07-21 4:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-19 3:28 [PATCH] raid0: data corruption when using trim Seunguk Shin
2015-07-20 12:33 ` Martin K. Petersen
2015-07-20 17:38 ` Piergiorgio Sartor
2015-07-20 18:26 ` Martin K. Petersen
2015-07-20 18:34 ` Piergiorgio Sartor
2015-07-21 4:28 ` Martin K. Petersen
2015-07-23 16:46 ` Gionatan Danti
2015-07-23 22:17 ` Martin K. Petersen
2015-07-24 6:37 ` Gionatan Danti
2015-07-21 4:18 ` Seunguk Shin
2015-07-21 4:55 ` Martin K. Petersen [this message]
2015-07-22 11:21 ` Seunguk Shin
2015-07-22 11:59 ` Martin K. Petersen
2015-07-24 6:47 ` Gionatan Danti
[not found] ` <023401d0c60a$fff39330$ffdab990$@samsung.com>
2015-07-24 14:42 ` Gionatan Danti
2015-07-24 15:03 ` Martin K. Petersen
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=yq1wpxu154v.fsf@sermon.lab.mkp.net \
--to=martin.petersen@oracle.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
--cc=seunguk.shin@samsung.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;
as well as URLs for NNTP newsgroup(s).