devfs - Populate getattr va_size for disks properly
authorAlex Hornung <ahornung@gmail.com>
Thu, 17 Dec 2009 15:29:15 +0000 (15:29 +0000)
committerAlex Hornung <ahornung@gmail.com>
Thu, 17 Dec 2009 15:35:01 +0000 (15:35 +0000)
commit2d0767552b6288b28a2ec45d633cfd93fa58ca64
tree94a4b0ea67f0dc22fa826f94026c672872921abe
parent946ecb1103a9ce80f24431de8ca0952ac974347c
devfs - Populate getattr va_size for disks properly

* As getattr() va_size is used for lseek SEEK_END, we need to set
  va_size for disk devices to the underlying device's media size.

* Beware that *stat() will not be affected, and st_size will remain
  the size of the devfs_node structure, as it has been so far.

Dragonfly-bug: http://bugs.dragonflybsd.org/issue1632
Reported-by: Steve O'Hara-Smith
sys/vfs/devfs/devfs_vnops.c