[lkml]   [2012]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH v5 08/12] block: Introduce new bio_split()

    On Mon, Aug 13, 2012 at 02:55:11PM -0700, Kent Overstreet wrote:
    > > If the condition is detectable, WARN_ON_ONCE() please.
    > I know I said I liked this idea, but I changed my mind.
    > Sticking a WARN_ON_ONCE() there is saying that passing __GFP_WAIT from
    > under generic_make_request() is always wrong - it might as well be a
    > BUG_ON() except warn is better for the user.

    WARN_ON_ONCE(), as opposed to BUG_ON(), doesn't mean that something
    isn't always wrong. It's just better to always use WARN variant if
    the system doesn't *need* to be put down immediately to avoid, say,
    massive data corruption - limping machine is simply better than dead

    > If that's true, then an assertion is completely wrong because we can
    > just do the right thing instead - mask out __GFP_WAIT if
    > current->bio_list != NULL and document that it can fail in that
    > situation.

    That's worse because it confuses the reader. Taking something which
    is as well-known as __GFP_WAIT and then silently ignoring it isn't a
    good idea. Please just add a WARN_ON.



     \ /
      Last update: 2012-08-14 01:02    [W:0.033 / U:264.048 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site