Sometimes devices can be 0-sized, where I/O is impossible.
This change skips _aio_start() in open() if the device size is 0. This avoids unnecessary AIO setup.
This issue was introduced in PR : https://github.com/ceph/ceph/pull/60791
Signed-off-by: Jaya Prakash <jayaprakash@ibm.com>
goto out_fail;
}
- r = _aio_start();
- if (r < 0) {
- goto out_fail;
+ if (size > 0) {
+ r = _aio_start();
+ if (r < 0) {
+ goto out_fail;
+ }
+ } else {
+ aio = false;
}
_discard_update_threads();