[CRIU] [PATCH 1/3] mount: Introduce BTRFS engine
Cyrill Gorcunov
gorcunov at gmail.com
Fri Nov 29 07:03:58 PST 2013
On Fri, Nov 29, 2013 at 06:47:48PM +0400, Pavel Emelyanov wrote:
> > @@ -1803,6 +1807,7 @@ err:
> > free_pstree(root_item);
> > free_file_locks();
> > free_link_remaps();
> > + btrfs_fini();
> >
> > close_service_fd(CR_PROC_FD_OFF);
> >
>
> Not needed, as mount infos are not released either.
I belive we should implement cleaning of mountinfos as well.
But ok, i'll drop it.
> > +static LIST_HEAD(btrfs_mount_head);
>
> This list is not needed. Put void *private link from mount-info
> to brtfs_root struct and (later, much later) release them altogether.
>
> > +struct btrfs_subvol_node {
> > + struct rb_node rb_node;
> > + struct list_head sibling;
>
> List is used purely for releasing. Can be either removed or
> reworked using rbtree.
If we're not cleaning up it in general -- i'll simply drop this.
> > +
> > + struct rb_node rb_dev;
> > + dev_t st_dev;
> > + ino_t st_ino;
>
> st_ino it completely unused.
It should be used in debug output, but I forgot to put it there.
Will drop, thanks.
> > +
> > + char *name;
> > + char *path;
> > + char *full;
> > + int deleted;
>
> Plz, comment the fields.
OK.
> > +
> > + fd = open(m->mountpoint, O_RDONLY);
> > + if (fd < 0) {
> > + pr_perror("Can't open mountpoint %s", m->mountpoint);
> > + return -1;
> > + }
> > +
>
> Mountpoint can be unreachable. The open_mountpoint() handles this.
Hmm, open_mountpoint can be used iif the complete mount tree is created,
so I presume you prefer to defer btrfs parsing and do it as a final stage
of mount points tree creation, right?
More information about the CRIU
mailing list