You should not put anything there, just leave room for someone else to
fill it in. It's the soft block size, and file systems typically set it
at mount time.
If 512b is the minimum request size you can do, you need to set
hardsect_size to that and trust that you wont get requests below that
size.
That's all you need to worry about.
> One more question about clustering:
> All IO requests for consecutive sectors are clustered in the same
> request structure, this much I understand. My question is, does
> the b_data field of the corresponding bufferheads are also
> sequential in the physical memory? In other words, can I satisfy a
> request if I simply transfer req->nr_sectors amount of data to
> req->buffer?
No this is very wrong. First of all, if you are setting up sg tables for
a request you never ever want to look at rq->buffer. Ever. You need to
loop through all the buffer heads attached to the request and setup an
sg entry for each of them.
A clustered request just means that it is contig on disk, not in memory.
Of course it can happen that some buffer_heads are also contig in memory
and you can coalesc these segments into one sg entry, but that all
depends on your hardware capabilities and you need to detect this
yourself.
BTW, I'm assuming a 2.4 kernel. In 2.5 this is all automated for you.
-- Jens Axboe- 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/