Re: cephfs snapc writeback order

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

 



On Tue, Jun 7, 2022 at 12:01 PM Jeff Layton <jlayton@xxxxxxxxxx> wrote:
I'm taking a stab at converting ceph to use the netfs write helpers. One
thing I'm seeing though is that the kclient takes great care to write
back data to the OSDs in order of snap context age, such that an older
snapc will get written back before a newer one. With the netfs helpers,
that may not happen quite as naturally. We may end up with it trying to
flush data for a newer snapc ahead of the older one.

My question is: is that necessarily a problem? We'd be sending along the
correct info from the capsnap for each snapc, which seems like it should
be sufficient to ensure that the writes get applied correctly. If we
were to send these out of order, what would break and how?

Yes, writing snaps in order is absolutely necessary. Snapshots in Ceph and in the osd are read-only. Once the osd sees snapid 7, it will not accept writes to snapid 6.

It may not break obviously by failing a write, but the old snapshot will definitely be missing data — IIRC the osd will generally insert any missing snapids it is aware of on incoming writes.
-Greg


--
Jeff Layton <jlayton@xxxxxxxxxx>

_______________________________________________
Dev mailing list -- dev@xxxxxxx
To unsubscribe send an email to dev-leave@xxxxxxx

[Index of Archives]     [CEPH Users]     [Ceph Devel]     [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