Re: [PATCH v5 5/8] virtio: Treat alloc_dax() -EOPNOTSUPP failure as non-fatal

2024-02-13 Thread Greg Kroah-Hartman
On Tue, Feb 13, 2024 at 02:46:05PM -0500, Mathieu Desnoyers wrote: > On 2024-02-13 01:25, Lukas Wunner wrote: > > On Mon, Feb 12, 2024 at 11:30:58AM -0500, Mathieu Desnoyers wrote: > > > In preparation for checking whether the architecture has data cache > > > aliasing within alloc_dax(), modify

Re: [PATCH v5 5/8] virtio: Treat alloc_dax() -EOPNOTSUPP failure as non-fatal

2024-02-13 Thread Mathieu Desnoyers
On 2024-02-12 18:02, Dan Williams wrote: [...] ...and Mathieu, this should be IS_ERR_OR_NULL() to skip an unnecessary call to virtio_fs_cleanup_dax() at function exit that the compiler should elide. OK, so I'll go back to the previous approach for v6: DEFINE_FREE(cleanup_dax, struct dax_dev

Re: [PATCH v5 5/8] virtio: Treat alloc_dax() -EOPNOTSUPP failure as non-fatal

2024-02-13 Thread Mathieu Desnoyers
On 2024-02-13 01:25, Lukas Wunner wrote: On Mon, Feb 12, 2024 at 11:30:58AM -0500, Mathieu Desnoyers wrote: In preparation for checking whether the architecture has data cache aliasing within alloc_dax(), modify the error handling of virtio virtio_fs_setup_dax() to treat alloc_dax() -EOPNOTSUPP

Re: [PATCH v5 5/8] virtio: Treat alloc_dax() -EOPNOTSUPP failure as non-fatal

2024-02-13 Thread Dan Williams
Lukas Wunner wrote: > On Mon, Feb 12, 2024 at 03:02:46PM -0800, Dan Williams wrote: > > However, Lukas, I think Linus is right, your DEFINE_FREE() should use > > IS_ERR_OR_NULL(). > > Uh... that's a negative, sir. ;) > > IS_ERR_OR_NULL() results in... > * a superfluous NULL pointer check in

Re: [PATCH v5 5/8] virtio: Treat alloc_dax() -EOPNOTSUPP failure as non-fatal

2024-02-12 Thread Lukas Wunner
On Mon, Feb 12, 2024 at 11:30:58AM -0500, Mathieu Desnoyers wrote: > In preparation for checking whether the architecture has data cache > aliasing within alloc_dax(), modify the error handling of virtio > virtio_fs_setup_dax() to treat alloc_dax() -EOPNOTSUPP failure as > non-fatal. > >

Re: [PATCH v5 5/8] virtio: Treat alloc_dax() -EOPNOTSUPP failure as non-fatal

2024-02-12 Thread Lukas Wunner
On Mon, Feb 12, 2024 at 03:02:46PM -0800, Dan Williams wrote: > However, Lukas, I think Linus is right, your DEFINE_FREE() should use > IS_ERR_OR_NULL(). Uh... that's a negative, sir. ;) IS_ERR_OR_NULL() results in... * a superfluous NULL pointer check in x509_key_preparse() and * a superfluous

Re: [PATCH v5 5/8] virtio: Treat alloc_dax() -EOPNOTSUPP failure as non-fatal

2024-02-12 Thread Dan Williams
[ add Lukas ] Linus Torvalds wrote: > On Mon, 12 Feb 2024 at 14:04, Dan Williams wrote: > > > > This works because the internals of virtio_fs_cleanup_dax(), "kill_dax() > > and put_dax()", know how to handle a NULL @dax_dev. It is still early > > days with the "cleanup" helpers, but I wonder if

Re: [PATCH v5 5/8] virtio: Treat alloc_dax() -EOPNOTSUPP failure as non-fatal

2024-02-12 Thread Linus Torvalds
On Mon, 12 Feb 2024 at 14:04, Dan Williams wrote: > > This works because the internals of virtio_fs_cleanup_dax(), "kill_dax() > and put_dax()", know how to handle a NULL @dax_dev. It is still early > days with the "cleanup" helpers, but I wonder if anyone else cares that > the DEFINE_FREE()

RE: [PATCH v5 5/8] virtio: Treat alloc_dax() -EOPNOTSUPP failure as non-fatal

2024-02-12 Thread Dan Williams
Mathieu Desnoyers wrote: > In preparation for checking whether the architecture has data cache > aliasing within alloc_dax(), modify the error handling of virtio > virtio_fs_setup_dax() to treat alloc_dax() -EOPNOTSUPP failure as > non-fatal. > > Co-developed-by: Dan Williams > Signed-off-by:

[PATCH v5 5/8] virtio: Treat alloc_dax() -EOPNOTSUPP failure as non-fatal

2024-02-12 Thread Mathieu Desnoyers
In preparation for checking whether the architecture has data cache aliasing within alloc_dax(), modify the error handling of virtio virtio_fs_setup_dax() to treat alloc_dax() -EOPNOTSUPP failure as non-fatal. Co-developed-by: Dan Williams Signed-off-by: Dan Williams Fixes: d92576f1167c ("dax: