ctf: remove ctf_fs_ds_file::msg_iter field
I find it strange that ctf_fs_ds_file objects knows about the
ctf_msg_iter that iterates on it. The ctf_fs_ds_file object just
represents some data that is accessible (a data stream file and the
portion currently mmap-ed), but I don't think it should know anything
about the iterating operation.
This patch removes the msg_iter field of ctf_fs_ds_file and adjusts the
code accordingly.
I think this change makes the code a bit clearer when we create
ctf_msg_iter objects. Currently, we create the msg_iter first with a
NULL medium ops data, then create the ctf_fs_ds_file. In
ctf_fs_ds_file_create, it sets the ctf_msg_iter's medium ops data to the
ctf_fs_ds_file.
With this patch, we create the ctf_fs_ds_file first. Then, when we
create the ctf_msg_iter, we can pass the ctf_fs_ds_file as the medium
ops data directly when we create the ctf_msg_iter.
Change-Id: I247f039d225888c059f08ccdccc86abf0816a6c4
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
This page took 0.026851 seconds and 4 git commands to generate.