Re: block size vs bvec length

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/6/20 12:35 AM, Valdis Klētnieks wrote:
What is the actual device backing this block device?

There's no real device behind the driver: it's just writing the data on the
memory.
That's called a read-modify-write (RMW) cycle, and is used when a write request
isn't exactly one physical block long, and it happens for file devices as well,
it's just hidden by the file system layer.

I understand this, but I don't understand why it's using 4096 as unit rather
than 512 that is the logical (and physical) block size I set for the queue
using blk_queue_logical_block_size(). What's the relation between actual block
size and the size of a segment (the bv_len field of the bio_vec struct) ?

Is it related somehow to the page size? Does a segment need to be at least long
as the page size? For example I've noticed that blk_queue_max_segment_size()
will set the max segment size to PAGE_SIZE if the given size it's < PAGE_SIZE.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux