ubd: untagle discard vs write zeroes not support handling
authorChristoph Hellwig <hch@lst.de>
Fri, 31 May 2024 07:47:57 +0000 (09:47 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 14 Jun 2024 16:19:44 +0000 (10:19 -0600)
commit31ade7d4fdcf382beb8cb229a1f5d77e0f239672
treec56a3545605992ed1221ea87627c56726f5ce6c7
parent5db755fbb1a0de4a4cfd5d5edfaa19853b9c56e6
ubd: untagle discard vs write zeroes not support handling

Discard and Write Zeroes are different operation and implemented
by different fallocate opcodes for ubd.  If one fails the other one
can work and vice versa.

Split the code to disable the operations in ubd_handler to only
disable the operation that actually failed.

Fixes: 50109b5a03b4 ("um: Add support for DISCARD in the UBD Driver")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-By: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Link: https://lore.kernel.org/r/20240531074837.1648501-3-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
arch/um/drivers/ubd_kern.c