Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (2m)  netbsd-10 (7d)  netbsd-9 (7d)  netbsd-8 (12d) 

2024-05-24 10:02:34 UTC Now

2023-07-27 17:56:31 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by bouyer in ticket #248):

sys/arch/xen/xen/xbd_xenbus.c: revision 1.132 (patch)
sys/arch/xen/xen/xbd_xenbus.c: revision 1.133 (patch)
sys/arch/xen/xen/xbd_xenbus.c: revision 1.134 (patch)

The disk size reported in the xenstore is always in XEN_BSIZE units,
not sector-size. Should fix the issue reported by Christian Kujau
on netbsd-users and port-xen.

Also use XEN_BSIZE when computing the number of bytes for format_bytes().
While there note in a comment that sc_sectors is in XEN_BSIZE units

Propoerly handle 4k sector size backends:
- report the backend's sector size to upper layers, not DEV_BSIZE.
  Adjust the number of sectors accordingly.
- Use sc_secsize instead of XEN_BSIZE where appropriate. The sectors numbers
  in I/O requests are still in XEN_BSIZE units, but must be a multiple
  of sc_secsize/XEN_BSIZE.
- As a consequence of previous, the buffer has to be aligned to sc_secsize,
  aligned to XEN_BSIZE may not be enough. This means that we may have to
  xbd_map_align() more buffer, including some without B_PHYS set.
- Add some more DPRINTF lines, related to I/O requests

Tested with a linux dom0.

thanks to Christian Kujau for providing access to his hardware for testing
and debugging.

(martin)