Re: [PATCH 8/9] rbd: set req->r_abort_on_full in writing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux