queue barrier support
Subsystems (4)
PATCH 1/1 queue barrier support
Hi,
Chris finally got me back in gear with the write barrier patch (for 2.4, 2.5 had a few missing pieces). The following changesets exists:
[email protected], 2002-02-13 13:22:40+01:00, [email protected]
Misc small changes and fixes to properly support barrier writes for journalled file systems. The support was basically already there with the bio merge, since it had not been used at all there were a few loose ends though.
[email protected], 2002-02-13 13:23:34+01:00, [email protected]
IDE barrier write support through write cache flushing.
[email protected], 2002-02-13 13:42:39+01:00, [email protected]
Add support for SCSI drivers to indicate support for ordered tags
[email protected], 2002-02-13 13:43:04+01:00, [email protected]
Add ordered tag support to the aic7xxx scsi driver
[email protected], 2002-02-13 13:44:18+01:00, [email protected]
reiserfs barrier write support
Patches attached, comments welcome.
Signature · 1 line
Jens Axboe
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.294 -> 1.295
# drivers/block/ll_rw_blk.c 1.46 -> 1.47
# include/linux/blkdev.h 1.31 -> 1.32
# include/linux/bio.h 1.12 -> 1.13
# include/linux/fs.h 1.81 -> 1.82
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/02/13 [email protected] 1.295
# Misc small changes and fixes to properly support barrier writes for
# journalled file systems. The support was basically already there # with the bio merge, since it had not been used at all there were a # few loose ends though. # -------------------------------------------- # diff -Nru a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c --- a/drivers/block/ll_rw_blk.c Wed Feb 13 13:48:11 2002 +++ b/drivers/block/ll_rw_blk.c Wed Feb 13 13:48:11 2002 @@ -123,6 +123,31 @@ }
/**
+ * blk_queue_ordered - does this queue support ordered writes
+ * @q: the request queue
+ * @flag: see below
+ *
+ * Description:
+ * For journalled file systems, doing ordered writes on a commit + * block instead of explicitly doing wait_on_buffer (which is bad + * for performance) can be a big win. Block drivers supporting this + * feature should call this function and indicate so. + * + * SCSI drivers usually need to support ordered tags, while others + * may have to do a complete drive cache flush if they are using write + * back caching (or not and lying about it) + * + * With this in mind, the values are + * QUEUE_ORDERED_NONE: the default, doesn't support barrier + * QUEUE_ORDERED_TAG: supports ordered tags + * QUEUE_ORDERED_FLUSH: supports barrier through cache flush
+ **/
+void blk_queue_ordered(request_queue_t *q, int flag)
+{
+ q->queue_barrier = flag;
+}
+
+/**
* blk_queue_make_request - define an alternate make_request function for a device
* @q: the request queue for the device to be affected
* @mfn: the alternate make_request function
@@ -1099,7 +1124,12 @@
spin_lock_prefetch(q->queue_lock);
- barrier = test_bit(BIO_RW_BARRIER, &bio->bi_rw);
+ barrier = bio_barrier(bio);
+
+ if (barrier && q->queue_barrier == QUEUE_BARRIER_NONE) {
+ set_bit(BIO_OPNOTSUPP, &bio->bi_flags);
+ goto end_io;
+ }
spin_lock_irq(q->queue_lock);
again:
@@ -1380,7 +1410,7 @@
BIO_BUG_ON(!bio->bi_size);
BIO_BUG_ON(!bio->bi_io_vec);
- bio->bi_rw = rw;
+ bio->bi_rw |= rw;
if (rw & WRITE)
kstat.pgpgout += count;
@@ -1425,6 +1455,9 @@
bio->bi_end_io = end_bio_bh_io_sync;
bio->bi_private = bh;
+
+ if (buffer_ordered(bh))
+ bio->bi_rw |= 1 << BIO_RW_BARRIER;
return submit_bio(rw, bio);
}
include/linux/bio.h +2 -1
@@ -101,6 +101,7 @@#define BIO_EOF 2/* out-out-bounds error */ #define BIO_SEG_VALID 3/* nr_hw_seg valid */ #define BIO_CLONED 4/* doesn't own data */ +#define BIO_OPNOTSUPP 5/* not supported */ /* * bio bi_rw flags
@@ -123,7 +124,7 @@#define bio_offset (bio) bio_iovec((bio))->bv_offset#define bio_sectors (bio) ((bio)->bi_size >> 9)#define bio_data (bio) (page_address(bio_page((bio))) + bio_offset((bio))) -#define bio_barrier (bio) ((bio)->bi_rw & (1 << BIO_BARRIER)) +#define bio_barrier (bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER))/* * will die
include/linux/blkdev.h +7 -0
@@ -174,6 +174,8 @@*/ unsigned long queue_flags; +char queue_barrier; +/* * protects queue structures from reentrancy */
@@ -202,6 +204,10 @@#define QUEUE_FLAG_PLUGGED 0/* queue is plugged */ #define QUEUE_FLAG_CLUSTER 1/* cluster several segments into 1 */ +#define QUEUE_BARRIER_NONE 0/* barrier not supported */ +#define QUEUE_BARRIER_TAG 1/* barrier supported through tags */ +#define QUEUE_BARRIER_FLUSH 2/* barrier supported through flush */ +#define blk_queue_plugged (q) test_bit(QUEUE_FLAG_PLUGGED, &(q)->queue_flags)#define blk_mark_plugged (q) set_bit(QUEUE_FLAG_PLUGGED, &(q)->queue_flags)#define blk_queue_empty (q) elv_queue_empty(q)
@@ -308,6 +314,7 @@extern void blk_queue_segment_boundary (request_queue_t *q,unsigned long );extern void blk_queue_assign_lock (request_queue_t *q,spinlock_t *);extern void blk_queue_prep_rq (request_queue_t *q,prep_rq_fn *pfn); +extern void blk_queue_ordered (request_queue_t *,int );extern int blk_rq_map_sg (request_queue_t *,struct request *,struct scatterlist *);extern void blk_dump_rq_flags (struct request *,char *);
include/linux/fs.h +2 -0
@@ -221,6 +221,7 @@ BH_Wait_IO,/* 1 if we should write out this buffer */ BH_launder,/* 1 if we should throttle on this buffer */ BH_JBD ,/* 1 if it has an attached journal_head */ + BH_Ordered,/* 1 if this buffer is a write barrier */ BH_PrivateStart,/* not a state bit, but the first bit available* for private allocation by other entities
@@ -278,6 +279,7 @@#define buffer_mapped (bh) __buffer_state(bh,Mapped)#define buffer_new (bh) __buffer_state(bh,New)#define buffer_async (bh) __buffer_state(bh,Async) +#define buffer_ordered (bh) __buffer_state(bh,Ordered)#define bh_offset (bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK)
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.295 -> 1.296
# drivers/ide/ide-probe.c 1.16 -> 1.17
# include/linux/ide.h 1.11 -> 1.12
# drivers/ide/ide.c 1.27 -> 1.28
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/02/13 [email protected] 1.296
# IDE barrier write support through write cache flushing.
# --------------------------------------------
#
drivers/ide/ide-probe.c +3 -0
@@ -633,6 +633,9 @@/* This is a driver limit and could be eliminated. */ blk_queue_max_phys_segments (q,PRD_ENTRIES ); + +/* assume all drivers can do ordered flush, disable this later if not */ +blk_queue_ordered (q,QUEUE_BARRIER_FLUSH ); }/*
drivers/ide/ide.c +71 -4
102 lines not on this page · raw message
include/linux/ide.h +1 -0
@@ -448,6 +448,7 @@byte acoustic;/* acoustic management */ unsigned int failures;/* current failure count */ unsigned int max_failures;/* maximum allowed failure count */ +char special_buf[4 ];/* IDE_DRIVE_CMD, free use */ } ide_drive_t;/*
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.296 -> 1.297 # drivers/scsi/hosts.c 1.8 -> 1.9 # drivers/scsi/hosts.h 1.8 -> 1.9 # drivers/scsi/scsi.c 1.24 -> 1.25
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/02/13 [email protected] 1.297
# Add support for SCSI drivers to indicate support for ordered tags # --------------------------------------------
#
drivers/scsi/hosts.c +1 -0
@@ -230,6 +230,7 @@ retval->select_queue_depths = tpnt->select_queue_depths; retval->max_sectors = tpnt->max_sectors; + retval->can_order = tpnt->can_order;if (!scsi_hostlist) scsi_hostlist = retval;
drivers/scsi/hosts.h +3 -0
@@ -286,6 +286,8 @@ unsigned highmem_io:1; + unsigned can_order:1; +/* * Name of proc directory */
@@ -386,6 +388,7 @@ unsigned unchecked_isa_dma:1; unsigned use_clustering:1; unsigned highmem_io:1; + unsigned can_order:1;/* * Host has rejected a command because it was busy.
drivers/scsi/scsi.c +2 -0
@@ -215,6 +215,8 @@if (!SHpnt->use_clustering)clear_bit (QUEUE_FLAG_CLUSTER , &q->queue_flags); +if (SHpnt->can_order) +blk_queue_ordered (&SDpnt->request_queue,QUEUE_BARRIER_TAG ); }#ifdef MODULE
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.297 -> 1.298
# drivers/scsi/aic7xxx/aic7xxx_linux_host.h 1.5 -> 1.6
# drivers/scsi/aic7xxx/aic7xxx_linux.c 1.15 -> 1.16
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/02/13 [email protected] 1.298
# Add ordered tag support to the aic7xxx scsi driver
# --------------------------------------------
#
drivers/scsi/aic7xxx/aic7xxx_linux.c +3 -0
@@ -1635,6 +1635,9 @@ } } +if (cmd->request.flags &REQ_BARRIER ) + hscb->control |=MSG_ORDERED_Q_TAG ; + hscb->cdb_len = cmd->cmd_len;if (hscb->cdb_len <=12 ) {memcpy (hscb->shared_data.cdb, cmd->cmnd, hscb->cdb_len);
drivers/scsi/aic7xxx/aic7xxx_linux_host.h +2 -1
@@ -89,7 +89,8 @@ present: 0, /* number of 7xxx's present */\ unchecked_isa_dma: 0, /* no memory DMA restrictions */\ use_clustering: ENABLE_CLUSTERING, \ - highmem_io: 1 \ + highmem_io: 1, \ + can_order: 1, \ } #endif /* _AIC7XXX_LINUX_HOST_H_ */
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.298 -> 1.299
# fs/reiserfs/journal.c 1.27 -> 1.28
# fs/reiserfs/super.c 1.28 -> 1.29
# include/linux/reiserfs_fs_sb.h 1.9 -> 1.10
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/02/13 [email protected] 1.299
# reiserfs barrier write support # -------------------------------------------- # diff -Nru a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c --- a/fs/reiserfs/journal.c Wed Feb 13 13:50:34 2002 +++ b/fs/reiserfs/journal.c Wed Feb 13 13:50:34 2002 @@ -115,6 +115,21 @@ return 0 ; }
+static int barrier_wait_on_buffer(struct super_block *s, struct buffer_head *bh) +{
+ int ordered = test_and_clear_bit(BH_Ordered, &bh->b_state) ;
+ if (!reiserfs_barrier(s) || ordered) {
+ wait_on_buffer(bh) ;
+ }
+ return 0 ;
+}
+
+static void mark_barrier(struct super_block *s, struct buffer_head *bh) +{
+ if (reiserfs_barrier(s))
+ set_bit(BH_Ordered, &bh->b_state);
+}
+
static struct reiserfs_bitmap_node *
allocate_bitmap_node(struct super_block *p_s_sb) {
struct reiserfs_bitmap_node *bn ;
@@ -721,7 +736,7 @@
bn = SB_ONDISK_JOURNAL_1st_BLOCK(s) + (jl->j_start + i) % SB_ONDISK_JOURNAL_SIZE(s) ;
tbh = get_hash_table(SB_JOURNAL_DEV(s), bn, s->s_blocksize) ;- wait_on_buffer(tbh) ;
+ barrier_wait_on_buffer(s, tbh) ;
if (!buffer_uptodate(tbh)) {
reiserfs_panic(s, "journal-601, buffer write failed\n") ;
}@@ -741,9 +756,10 @@
atomic_read(&(jl->j_commit_left)));
}
+ mark_barrier(s, jl->j_commit_bh);
mark_buffer_dirty(jl->j_commit_bh) ;
ll_rw_block(WRITE, 1, &(jl->j_commit_bh)) ;
- wait_on_buffer(jl->j_commit_bh) ;
+ barrier_wait_on_buffer(s, jl->j_commit_bh) ;
if (!buffer_uptodate(jl->j_commit_bh)) {
reiserfs_panic(s, "journal-615: buffer write failed\n") ;
}
@@ -835,8 +851,9 @@
jh->j_first_unflushed_offset = cpu_to_le32(offset) ;
jh->j_mount_id = cpu_to_le32(SB_JOURNAL(p_s_sb)->j_mount_id) ;
set_bit(BH_Dirty, &(SB_JOURNAL(p_s_sb)->j_header_bh->b_state)) ;
+ mark_barrier(p_s_sb, SB_JOURNAL(p_s_sb)->j_header_bh);
ll_rw_block(WRITE, 1, &(SB_JOURNAL(p_s_sb)->j_header_bh)) ;
- wait_on_buffer((SB_JOURNAL(p_s_sb)->j_header_bh)) ;
+ barrier_wait_on_buffer(p_s_sb, (SB_JOURNAL(p_s_sb)->j_header_bh)) ;
if (!buffer_uptodate(SB_JOURNAL(p_s_sb)->j_header_bh)) {
printk( "reiserfs: journal-837: IO error during journal replay\n" );
return -EIO ;@@ -1057,7 +1074,7 @@
if (!cn->bh) {
reiserfs_panic(s, "journal-1011: cn->bh is NULL\n") ;
}
- wait_on_buffer(cn->bh) ;
+ barrier_wait_on_buffer(s, cn->bh) ;
if (!cn->bh) {
reiserfs_panic(s, "journal-1012: cn->bh is NULL\n") ;
}
@@ -1163,7 +1180,7 @@
} else if (test_bit(BLOCK_NEEDS_FLUSH, &cn->state)) {
clear_bit(BLOCK_NEEDS_FLUSH, &cn->state) ;
if (!pjl && cn->bh) {
- wait_on_buffer(cn->bh) ;
+ barrier_wait_on_buffer(s, cn->bh) ;
}
/* check again, someone could have logged while we scheduled */
pjl = find_newer_jl_for_cn(cn) ;fs/reiserfs/super.c +6 -0
@@ -380,6 +380,9 @@reiserfs_prepare_for_journal (s,SB_BUFFER_WITH_SB (s),1 ) ;set_sb_umount_state (SB_DISK_SUPER_BLOCK (s), s->u.reiserfs_sb.s_mount_state );journal_mark_dirty (&th, s,SB_BUFFER_WITH_SB (s)); + +/* force full waits when unmounting */ + s->u.reiserfs_sb.s_mount_opt &= ~(1 <<REISERFS_BARRIER ) ; }/* note, journal_release checks for readonly mount, and can decide not
@@ -528,6 +531,9 @@set_bit (REISERFS_NO_UNHASHED_RELOCATION , mount_options); }else if (!strcmp (this_char,"hashed_relocation" )) {set_bit (REISERFS_HASHED_RELOCATION , mount_options); + }else if (!strcmp (this_char,"barrier" )) { +set_bit (REISERFS_BARRIER , mount_options); +printk ("reiserfs: enabling write barrier code\n" ) ; }else if (!strcmp (this_char,"test4" )) {set_bit (REISERFS_TEST4 , mount_options); }else if (!strcmp (this_char,"nolog" )) {
include/linux/reiserfs_fs_sb.h +3 -6
@@ -405,12 +405,8 @@#define REISERFS_NO_BORDER 11#define REISERFS_NO_UNHASHED_RELOCATION 12#define REISERFS_HASHED_RELOCATION 13 -#define REISERFS_TEST4 14 - -#define REISERFS_TEST1 11 -#define REISERFS_TEST2 12 -#define REISERFS_TEST3 13 -#define REISERFS_TEST4 14 +#define REISERFS_BARRIER 14 +#define REISERFS_TEST4 15#define reiserfs_r5_hash (s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << FORCE_R5_HASH))#define reiserfs_rupasov_hash (s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << FORCE_RUPASOV_HASH))
@@ -419,6 +415,7 @@#define reiserfs_no_border (s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << REISERFS_NO_BORDER))#define reiserfs_no_unhashed_relocation (s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << REISERFS_NO_UNHASHED_RELOCATION))#define reiserfs_hashed_relocation (s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << REISERFS_HASHED_RELOCATION)) +#define reiserfs_barrier (s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << REISERFS_BARRIER))#define reiserfs_test4 (s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << REISERFS_TEST4))#define dont_have_tails (s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << NOTAIL))
include/linux/ide.h line 453
Quoted 12 lines · Jens Axboe
Patches attached, comments welcome.
diff -Nru
a/include/linux/ide.hb/include/linux/ide.hinclude/linux/ide.h +1
-0@@ -448,6 +448,7 @@byte acoustic;/* acoustic management */ unsigned int failures;/* current failure count */ unsigned int max_failures;/* maximum allowed failure count */ +char special_buf[4 ];/* IDE_DRIVE_CMD, free use */ } ide_drive_t;
ide-barrier-1-c1.296:+ memset(drive->special_buf, 0, sizeof(drive->special_buf)); ide-barrier-1-c1.296:+ flush_rq->buffer = drive->special_buf; ide-barrier-1-c1.296:+ char special_buf[4]; /* IDE_DRIVE_CMD, free use */
I just don't see special_buf used anywhere. What is it supposed to be used for? Is the intention to make it look like the SCSI code?
Quoted 1 line
Quoted 20 lines · Martin Dalecki
include/linux/ide.h line 453
Quoted 12 lines · Jens Axboe
Patches attached, comments welcome.
diff -Nru
a/include/linux/ide.hb/include/linux/ide.hinclude/linux/ide.h +1
-0@@ -448,6 +448,7 @@byte acoustic;/* acoustic management */ unsigned int failures;/* current failure count */ unsigned int max_failures;/* maximum allowed failure count */ +char special_buf[4 ];/* IDE_DRIVE_CMD, free use */ } ide_drive_t;ide-barrier-1-c1.296:+
memset(drive->special_buf, 0, sizeof(drive->special_buf));
ide-barrier-1-c1.296:+flush_rq->buffer=drive->special_buf;
ide-barrier-1-c1.296:+ char special_buf[4]; /*IDE_DRIVE_CMD, free use */
Quoted 3 lines
I just don't see
special_bufused anywhere. What is it supposed to be used for?
Is the intention to make it look like the SCSI code?
See ide.c:ide_queue_flush_cmd(), I'm only using 1 of the bytes but it has room for 4 like that is typically used when issuing an ata command directly. So yes, it is used, I'm not adding stuff for fun :-)
Signature · 1 line
Jens Axboe
Quoted 20 lines · Jens Axboe
Quoted 18 lines · Martin Dalecki
include/linux/ide.h line 453
Quoted 12 lines · Jens Axboe
Patches attached, comments welcome.
diff -Nru
a/include/linux/ide.hb/include/linux/ide.hinclude/linux/ide.h +1
-0@@ -448,6 +448,7 @@byte acoustic;/* acoustic management */ unsigned int failures;/* current failure count */ unsigned int max_failures;/* maximum allowed failure count */ +char special_buf[4 ];/* IDE_DRIVE_CMD, free use */ } ide_drive_t;ide-barrier-1-c1.296:+ memset(drive->special_buf, 0, sizeof(drive->special_buf)); ide-barrier-1-c1.296:+ flush_rq->buffer = drive->special_buf; ide-barrier-1-c1.296:+ char special_buf[4]; /* IDE_DRIVE_CMD, free use */
Quoted 8 lines
Quoted 3 lines
I just don't see
special_bufused anywhere. What is it supposed to be used for? Is the intention to make it look like the SCSI code?See ide.c:ide_queue_flush_cmd(), I'm only using 1 of the bytes but it has room for 4 like that is typically used when issuing an ata command directly. So yes, it is used, I'm not adding stuff for fun :-)
OK I see now. Is this to become analogous to the sr_cmnd field for struct scsi_request? It would make sense to first make them use the same software architecture at least and then to merge as much of this driver mid-layer stuff as possible....
Quoted 32 lines · Martin Dalecki
Quoted 22 lines · Martin Dalecki
Quoted 21 lines
include/linux/ide.h line 453
Quoted 12 lines · Jens Axboe
Patches attached, comments welcome.
diff -Nru
a/include/linux/ide.hb/include/linux/ide.hinclude/linux/ide.h +1
-0@@ -448,6 +448,7 @@byte acoustic;/* acoustic management */ unsigned int failures;/* current failure count */ unsigned int max_failures;/* maximum allowed failure count */ +char special_buf[4 ];/* IDE_DRIVE_CMD, free use */ } ide_drive_t;ide-barrier-1-c1.296:+
memset(drive->special_buf, 0, sizeof(drive->special_buf));
ide-barrier-1-c1.296:+flush_rq->buffer=drive->special_buf;
ide-barrier-1-c1.296:+ char special_buf[4]; /*IDE_DRIVE_CMD, free use */Quoted 9 lines
Quoted 4 lines
I just don't see
special_bufused anywhere. What is it supposed to be used for?
Is the intention to make it look like the SCSI code?See ide.c:ide_queue_flush_cmd(), I'm only using 1 of the bytes but it has room for 4 like that is typically used when issuing an ata command directly. So yes, it is used, I'm not adding stuff for fun :-)
Quoted 5 lines
OK I see now. Is this to become analogous to the
sr_cmndfield for structscsi_request?
It would make sense to first make them use the same software architecture at least and then
to merge as much of this driver mid-layer stuff as possible....
Well dunno, typically users of IDE_DRIVE_CMD's are using ide_wait and thus waits for completion. So request and arguments are almost always allocated on the stack, which is fine in that case. For out-of-order execution like the pre and post flushes in the barrier patch, there just needed to be some bytes available for the data command.
The SCSI sr_cmnd[] cdb is different from the ATA register set, but in fact in 2.5 the IDE layer could use the cdb in struct request as a temp buffer for stuff like this. It's exactly what the ide-barrier patch above could use. So yeah I could clean special_buf[] and just use
rq->buffer = rq->cmd;
instead.
Signature · 1 line
Jens Axboe
Quoted 1 line · Jens Axboe
Patches attached, comments welcome.
A meta-comment: the BK url's are wonderfully informative and useful, but they are long and _ugly_! Is there anything that can be done about that?
Signature · 1 line
Daniel
Quoted 5 lines · Daniel Phillips
Quoted 1 line · Jens Axboe
Patches attached, comments welcome.
A meta-comment: the BK url's are wonderfully informative and useful, but they are long and _ugly_! Is there anything that can be done about that?
Yeah I like them too, maybe if I just figured out how to get BitKeeper to dump full changeset info I could just inline them in the mail instead. I'll look at up and try that next time.
Signature · 1 line
Jens Axboe
Quoted 10 lines · Jens Axboe
Quoted 5 lines · Daniel Phillips
Quoted 1 line · Jens Axboe
Patches attached, comments welcome.
A meta-comment: the BK url's are wonderfully informative and useful, but they are long and _ugly_! Is there anything that can be done about that?
Yeah I like them too, maybe if I just figured out how to get BitKeeper to dump full changeset info I could just inline them in the mail instead. I'll look at up and try that next time.
bk send -wgzip_uu -r<rev> - > foo-<rev>.bk
This will dump a gzipped-uuencoded changset to the file. The receiver just do "| bk receive [repository] -avv" to import it on the other end.
My preferred format for sending BK CSETs is below. The gzip_uu CSET data only adds maybe 10% for large patches, and about doubles the size of very small patches. I also created a bz64 (bzip2 + base64) wrapper which makes the CSET data smaller, but that is only useful if other BK developers have this wrapper also.
Cheers, Andreas
=============================== bksend ==================================== #!/bin/sh
# A script to format BK changeset output in a manner that is easy to read. # Andreas Dilger <[email protected]> 13/02/2002
PROG=bksend
usage() {
echo "usage: $PROG -r<rev>"
echo -e "\twhere <rev> is of the form '1.23', '1.23..', '1.23..1.27',"
echo -e "\tor '+' to indicate the most recent revision"
exit 1
}case $1 in
-r) REV=$2; shift ;;
-r*) REV=echo $1 | sed 's/^-r//' ;;
*) echo "$PROG: no revision given, you probably don't want that";; esac
[ -z "$REV" ] && usage
bk changes -r$REV
bk export -tpatch -du -h -r$REV
echo -e "\n================================================================\n\n" bk send -wgzip_uu -r$REV -
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/