To be more specific, the ENOSPC was introduced by
a9d6ceb838755c24dde8a0ca02c3378926fc63db.
Please check:
https://github.com/torvalds/linux/commit/a9d6ceb838755c24dde8a0ca02c3378926fc63db
Or, maybe we can keep the default behavior of blocking IO, but add a rbd
option like abort_on_full to
return ENOSPC in the case we really don't want any IO blocking in our
program.
Thanx
On 05/08/2018 10:58 AM, Dongsheng Yang wrote:
Thanx Ilya,
IIUC, the problem is that block layer will translate the ENOSPC
to EIO,
then it will cause filesystem corruption if the cluster get full ->
not full soon.
But Christoph introduce a new block status code type, which will
translate
the correct error number to users of block layer in 2017.
please check this commit:
https://github.com/torvalds/linux/commit/2a842acab109f40f0d7d10b38e9ca88390628996
Thanx
Yang
On 05/07/2018 10:30 PM, Ilya Dryomov wrote:
On Mon, May 7, 2018 at 10:44 AM, Dongsheng Yang
<dongsheng.yang@xxxxxxxxxxxx> wrote:
Signed-off-by: Dongsheng Yang <dongsheng.yang@xxxxxxxxxxxx>
---
drivers/block/rbd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 39ca0d7..a341929 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -1453,6 +1453,7 @@ static void rbd_osd_req_format_write(struct
rbd_obj_request *obj_request)
struct ceph_osd_request *osd_req = obj_request->osd_req;
osd_req->r_flags = CEPH_OSD_FLAG_WRITE;
+ osd_req->r_abort_on_full = true;
ktime_get_real_ts(&osd_req->r_mtime);
osd_req->r_data_offset = obj_request->ex.oe_off;
}
Blocking instead of returning -ENOSPC is intentional. See
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d29adb34a94715174c88ca93e8aba955850c9bde
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9a1ea2dbff11547a8e664f143c1ffefc586a577a
and associated tracker tickets.
Thanks,
Ilya
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html