lkml.org 
[lkml]   [2003]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[Patch 1/4] fs.h: b_journal_head
    Add a new member to struct buffer_head called b_journal_head.  This is
    for jbd to use, rather than have it peeking at b_private for in flight
    ios.
    --- diff/fs/buffer.c 2003-12-09 10:25:27.000000000 +0000
    +++ source/fs/buffer.c 2003-12-09 10:32:41.000000000 +0000
    @@ -763,6 +763,7 @@
    bh->b_list = BUF_CLEAN;
    bh->b_end_io = handler;
    bh->b_private = private;
    + bh->b_journal_head = NULL;
    }

    static void end_buffer_io_async(struct buffer_head * bh, int uptodate)
    --- diff/fs/jbd/journal.c 2003-12-09 10:25:27.000000000 +0000
    +++ source/fs/jbd/journal.c 2003-12-09 10:32:41.000000000 +0000
    @@ -1802,9 +1802,9 @@

    if (buffer_jbd(bh)) {
    /* Someone did it for us! */
    - J_ASSERT_BH(bh, bh->b_private != NULL);
    + J_ASSERT_BH(bh, bh->b_journal_head != NULL);
    journal_free_journal_head(jh);
    - jh = bh->b_private;
    + jh = bh->b_journal_head;
    } else {
    /*
    * We actually don't need jh_splice_lock when
    @@ -1812,7 +1812,7 @@
    */
    spin_lock(&jh_splice_lock);
    set_bit(BH_JBD, &bh->b_state);
    - bh->b_private = jh;
    + bh->b_journal_head = jh;
    jh->b_bh = bh;
    atomic_inc(&bh->b_count);
    spin_unlock(&jh_splice_lock);
    @@ -1821,7 +1821,7 @@
    }
    jh->b_jcount++;
    spin_unlock(&journal_datalist_lock);
    - return bh->b_private;
    + return bh->b_journal_head;
    }

    /*
    @@ -1854,7 +1854,7 @@
    J_ASSERT_BH(bh, jh2bh(jh) == bh);
    BUFFER_TRACE(bh, "remove journal_head");
    spin_lock(&jh_splice_lock);
    - bh->b_private = NULL;
    + bh->b_journal_head = NULL;
    jh->b_bh = NULL; /* debug, really */
    clear_bit(BH_JBD, &bh->b_state);
    __brelse(bh);
    --- diff/include/linux/fs.h 2003-12-09 10:25:27.000000000 +0000
    +++ source/include/linux/fs.h 2003-12-09 10:32:41.000000000 +0000
    @@ -265,7 +265,7 @@
    struct page *b_page; /* the page this bh is mapped to */
    void (*b_end_io)(struct buffer_head *bh, int uptodate); /* I/O completion */
    void *b_private; /* reserved for b_end_io */
    -
    + void *b_journal_head; /* ext3 journal_heads */
    unsigned long b_rsector; /* Real buffer location on disk */
    wait_queue_head_t b_wait;

    --- diff/include/linux/jbd.h 2003-06-16 09:56:12.000000000 +0100
    +++ source/include/linux/jbd.h 2003-12-09 10:32:41.000000000 +0000
    @@ -311,7 +311,7 @@

    static inline struct journal_head *bh2jh(struct buffer_head *bh)
    {
    - return bh->b_private;
    + return bh->b_journal_head;
    }

    #define HAVE_JOURNAL_CALLBACK_STATUS
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2005-03-22 13:59    [W:0.023 / U:0.384 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site