Merge branch 'master' into for-linus
authorJens Axboe <jens.axboe@oracle.com>
Fri, 19 Mar 2010 07:05:10 +0000 (08:05 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 19 Mar 2010 07:05:10 +0000 (08:05 +0100)
Conflicts:
block/Kconfig

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
1  2 
block/blk-sysfs.c
drivers/block/drbd/drbd_int.h
drivers/scsi/sd.c
fs/bio.c

diff --combined block/blk-sysfs.c
@@@ -106,19 -106,6 +106,19 @@@ static ssize_t queue_max_sectors_show(s
        return queue_var_show(max_sectors_kb, (page));
  }
  
 +static ssize_t queue_max_segments_show(struct request_queue *q, char *page)
 +{
 +      return queue_var_show(queue_max_segments(q), (page));
 +}
 +
 +static ssize_t queue_max_segment_size_show(struct request_queue *q, char *page)
 +{
 +      if (test_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags))
 +              return queue_var_show(queue_max_segment_size(q), (page));
 +
 +      return queue_var_show(PAGE_CACHE_SIZE, (page));
 +}
 +
  static ssize_t queue_logical_block_size_show(struct request_queue *q, char *page)
  {
        return queue_var_show(queue_logical_block_size(q), page);
@@@ -293,16 -280,6 +293,16 @@@ static struct queue_sysfs_entry queue_m
        .show = queue_max_hw_sectors_show,
  };
  
 +static struct queue_sysfs_entry queue_max_segments_entry = {
 +      .attr = {.name = "max_segments", .mode = S_IRUGO },
 +      .show = queue_max_segments_show,
 +};
 +
 +static struct queue_sysfs_entry queue_max_segment_size_entry = {
 +      .attr = {.name = "max_segment_size", .mode = S_IRUGO },
 +      .show = queue_max_segment_size_show,
 +};
 +
  static struct queue_sysfs_entry queue_iosched_entry = {
        .attr = {.name = "scheduler", .mode = S_IRUGO | S_IWUSR },
        .show = elv_iosched_show,
@@@ -378,8 -355,6 +378,8 @@@ static struct attribute *default_attrs[
        &queue_ra_entry.attr,
        &queue_max_hw_sectors_entry.attr,
        &queue_max_sectors_entry.attr,
 +      &queue_max_segments_entry.attr,
 +      &queue_max_segment_size_entry.attr,
        &queue_iosched_entry.attr,
        &queue_hw_sector_size_entry.attr,
        &queue_logical_block_size_entry.attr,
@@@ -475,7 -450,7 +475,7 @@@ static void blk_release_queue(struct ko
        kmem_cache_free(blk_requestq_cachep, q);
  }
  
- static struct sysfs_ops queue_sysfs_ops = {
+ static const struct sysfs_ops queue_sysfs_ops = {
        .show   = queue_attr_show,
        .store  = queue_attr_store,
  };
@@@ -95,7 -95,7 +95,7 @@@ extern char usermode_helper[]
  
  /* All EEs on the free list should have ID_VACANT (== 0)
   * freshly allocated EEs get !ID_VACANT (== 1)
-  * so if it says "cannot dereference null pointer at adress 0x00000001",
+  * so if it says "cannot dereference null pointer at address 0x00000001",
   * it is most likely one of these :( */
  
  #define ID_IN_SYNC      (4711ULL)
@@@ -261,9 -261,6 +261,9 @@@ static inline const char *cmdname(enum 
                [P_OV_REQUEST]          = "OVRequest",
                [P_OV_REPLY]            = "OVReply",
                [P_OV_RESULT]           = "OVResult",
 +              [P_CSUM_RS_REQUEST]     = "CsumRSRequest",
 +              [P_RS_IS_IN_SYNC]       = "CsumRSIsInSync",
 +              [P_COMPRESSED_BITMAP]   = "CBitmap",
                [P_MAX_CMD]             = NULL,
        };
  
@@@ -446,18 -443,13 +446,18 @@@ struct p_rs_param_89 
        char csums_alg[SHARED_SECRET_MAX];
  } __packed;
  
 +enum drbd_conn_flags {
 +      CF_WANT_LOSE = 1,
 +      CF_DRY_RUN = 2,
 +};
 +
  struct p_protocol {
        struct p_header head;
        u32 protocol;
        u32 after_sb_0p;
        u32 after_sb_1p;
        u32 after_sb_2p;
 -      u32 want_lose;
 +      u32 conn_flags;
        u32 two_primaries;
  
                /* Since protocol version 87 and higher. */
@@@ -799,8 -791,6 +799,8 @@@ enum 
                                 * while this is set. */
        RESIZE_PENDING,         /* Size change detected locally, waiting for the response from
                                 * the peer, if it changed there as well. */
 +      CONN_DRY_RUN,           /* Expect disconnect after resync handshake. */
 +      GOT_PING_ACK,           /* set when we receive a ping_ack packet, misc wait gets woken */
  };
  
  struct drbd_bitmap; /* opaque for drbd_conf */
@@@ -1181,7 -1171,7 +1181,7 @@@ extern int drbd_bitmap_io(struct drbd_c
  /* Meta data layout
     We reserve a 128MB Block (4k aligned)
     * either at the end of the backing device
-    * or on a seperate meta data device. */
+    * or on a separate meta data device. */
  
  #define MD_RESERVED_SECT (128LU << 11)  /* 128 MB, unit sectors */
  /* The following numbers are sectors */
diff --combined drivers/scsi/sd.c
@@@ -2111,7 -2111,7 +2111,7 @@@ static int sd_revalidate_disk(struct ge
   *    which is followed by sdaaa.
   *
   *    This is basically 26 base counting with one extra 'nil' entry
-  *    at the beggining from the second digit on and can be
+  *    at the beginning from the second digit on and can be
   *    determined using similar method as 26 base conversion with the
   *    index shifted -1 after each digit is computed.
   *
@@@ -2185,7 -2185,7 +2185,7 @@@ static void sd_probe_async(void *data, 
        blk_queue_prep_rq(sdp->request_queue, sd_prep_fn);
  
        gd->driverfs_dev = &sdp->sdev_gendev;
 -      gd->flags = GENHD_FL_EXT_DEVT | GENHD_FL_DRIVERFS;
 +      gd->flags = GENHD_FL_EXT_DEVT;
        if (sdp->removable)
                gd->flags |= GENHD_FL_REMOVABLE;
  
diff --combined fs/bio.c
+++ b/fs/bio.c
@@@ -264,13 -264,12 +264,12 @@@ EXPORT_SYMBOL(bio_init)
   * bio_alloc_bioset - allocate a bio for I/O
   * @gfp_mask:   the GFP_ mask given to the slab allocator
   * @nr_iovecs:        number of iovecs to pre-allocate
-  * @bs:               the bio_set to allocate from. If %NULL, just use kmalloc
+  * @bs:               the bio_set to allocate from.
   *
   * Description:
-  *   bio_alloc_bioset will first try its own mempool to satisfy the allocation.
+  *   bio_alloc_bioset will try its own mempool to satisfy the allocation.
   *   If %__GFP_WAIT is set then we will block on the internal pool waiting
-  *   for a &struct bio to become free. If a %NULL @bs is passed in, we will
-  *   fall back to just using @kmalloc to allocate the required memory.
+  *   for a &struct bio to become free.
   *
   *   Note that the caller must set ->bi_destructor on successful return
   *   of a bio, to do the appropriate freeing of the bio once the reference
@@@ -555,7 -554,7 +554,7 @@@ static int __bio_add_page(struct reques
                                        .bi_rw = bio->bi_rw,
                                };
  
 -                              if (q->merge_bvec_fn(q, &bvm, prev) < len) {
 +                              if (q->merge_bvec_fn(q, &bvm, prev) < prev->bv_len) {
                                        prev->bv_len -= len;
                                        return 0;
                                }
                 * merge_bvec_fn() returns number of bytes it can accept
                 * at this offset
                 */
 -              if (q->merge_bvec_fn(q, &bvm, bvec) < len) {
 +              if (q->merge_bvec_fn(q, &bvm, bvec) < bvec->bv_len) {
                        bvec->bv_page = NULL;
                        bvec->bv_len = 0;
                        bvec->bv_offset = 0;