Commit 65995e9
Drivers: hv: Make the sysfs node size for the ring buffer dynamic
The ring buffer size varies across VMBus channels. The size of sysfs
node for the ring buffer is currently hardcoded to 4 MB. Userspace
clients either use fstat() or hardcode this size for doing mmap().
To address this, make the sysfs node size dynamic to reflect the
actual ring buffer size for each channel. This will ensure that
fstat() on ring sysfs node always returns the correct size of
ring buffer.
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Tested-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
Link: https://lore.kernel.org/r/20250502074811.2022-3-namjain@linux.microsoft.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent f31fe81 commit 65995e9
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1820 | 1820 | | |
1821 | 1821 | | |
1822 | 1822 | | |
1823 | | - | |
1824 | 1823 | | |
1825 | 1824 | | |
1826 | 1825 | | |
| |||
1880 | 1879 | | |
1881 | 1880 | | |
1882 | 1881 | | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
1883 | 1891 | | |
1884 | 1892 | | |
1885 | 1893 | | |
1886 | 1894 | | |
1887 | 1895 | | |
| 1896 | + | |
1888 | 1897 | | |
1889 | 1898 | | |
1890 | 1899 | | |
| |||
0 commit comments