All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Thornber <thornber@redhat.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: dm-devel@redhat.com, Mike Snitzer <msnitzer@redhat.com>,
	"Alasdair G. Kergon" <agk@redhat.com>
Subject: Re: [PATCH] dm-bufio
Date: Mon, 17 Oct 2011 12:11:28 +0100	[thread overview]
Message-ID: <20111017111128.GF13963@ubuntu> (raw)
In-Reply-To: <Pine.LNX.4.64.1110141500160.29246@hs20-bc2-1.build.redhat.com>

On Fri, Oct 14, 2011 at 03:14:34PM -0400, Mikulas Patocka wrote:
@@ -493,8 +500,10 @@ static void use_inline_bio(struct dm_buf
 static void submit_io(struct dm_buffer *b, int rw, sector_t block,
                      bio_end_io_t *end_io)
 {
-       if (b->c->block_size <= DM_BUFIO_INLINE_VECS * PAGE_SIZE &&
-           b->data_mode != DATA_MODE_VMALLOC)
+       if (rw == WRITE && b->c->write_callback)
+               b->c->write_callback(b);
        if (likely(b->c->block_size <= DM_BUFIO_INLINE_VECS * PAGE_SIZE) &&
            likely(b->data_mode != DATA_MODE_VMALLOC))
                use_inline_bio(b, rw, block, end_io);
        else
                use_dmio(b, rw, block, end_io);
@@ -550,8 +559,6 @@ static void __write_dirty_buffer(struct
        clear_bit(B_DIRTY, &b->state);
        wait_on_bit_lock(&b->state, B_WRITING,
                         do_io_schedule, TASK_UNINTERRUPTIBLE);
-       if (b->c->write_callback)
-               b->c->write_callback(b);
        submit_io(b, WRITE, b->block, write_endio);
 }


This doesn't seem an improvement.  Except ... it changes the behaviour
of dm_bufio_release_move().  So was there a preexisting bug in
dm_bufio_release_move() that you're trying to fix with this patch?

  parent reply	other threads:[~2011-10-17 11:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-14 19:14 [PATCH] dm-bufio Mikulas Patocka
2011-10-17 10:08 ` Joe Thornber
2011-10-17 12:41   ` dm-bufio Mike Snitzer
2011-10-17 14:04   ` [PATCH] dm-bufio Mikulas Patocka
2011-10-17 14:15     ` Joe Thornber
2011-10-17 10:29 ` Joe Thornber
2011-10-17 10:39 ` Joe Thornber
2011-10-17 10:43 ` Joe Thornber
2011-10-17 10:54 ` Joe Thornber
2011-10-17 13:47   ` Mikulas Patocka
2011-10-17 13:57     ` Joe Thornber
2011-10-17 10:57 ` Joe Thornber
2011-10-17 11:11 ` Joe Thornber [this message]
2011-10-17 14:05   ` Mikulas Patocka
2011-10-17 14:09     ` Joe Thornber
2011-10-17 16:22       ` Mikulas Patocka
2011-10-17 16:41         ` Joe Thornber
2011-10-17 18:30         ` Joe Thornber
2011-10-17 11:14 ` Joe Thornber
2011-10-17 13:43   ` Mikulas Patocka
2011-10-17 11:29 ` Joe Thornber
2011-10-17 16:24   ` Mikulas Patocka
2011-10-17 16:43     ` Joe Thornber

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=20111017111128.GF13963@ubuntu \
    --to=thornber@redhat.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=mpatocka@redhat.com \
    --cc=msnitzer@redhat.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.