Re: [PATCH] file-posix: Fix alignment after reopen changing O_DIRECT

2021-11-04 Thread Kevin Wolf
Am 04.11.2021 um 15:20 hat Stefano Garzarella geschrieben: > On Thu, Nov 04, 2021 at 12:31:09PM +0100, Kevin Wolf wrote: > > At the end of a reopen, we already call bdrv_refresh_limits(), which > > should update bs->request_alignment according to the new file > > descriptor. However, raw_probe_alig

Re: [PATCH] file-posix: Fix alignment after reopen changing O_DIRECT

2021-11-04 Thread Stefano Garzarella
On Thu, Nov 04, 2021 at 12:31:09PM +0100, Kevin Wolf wrote: At the end of a reopen, we already call bdrv_refresh_limits(), which should update bs->request_alignment according to the new file descriptor. However, raw_probe_alignment() relies on s->needs_alignment and just uses 1 if it isn't set. W

Re: [PATCH] file-posix: Fix alignment after reopen changing O_DIRECT

2021-11-04 Thread Hanna Reitz
On 04.11.21 12:31, Kevin Wolf wrote: At the end of a reopen, we already call bdrv_refresh_limits(), which should update bs->request_alignment according to the new file descriptor. However, raw_probe_alignment() relies on s->needs_alignment and just uses 1 if it isn't set. We neglected to update t

[PATCH] file-posix: Fix alignment after reopen changing O_DIRECT

2021-11-04 Thread Kevin Wolf
At the end of a reopen, we already call bdrv_refresh_limits(), which should update bs->request_alignment according to the new file descriptor. However, raw_probe_alignment() relies on s->needs_alignment and just uses 1 if it isn't set. We neglected to update this field, so starting with cache=write