{"push_id":1116509790,"size":3,"distinct_size":3,"ref":"refs/heads/127","head":"080d6b9b36f4a3e01c4f670fa6c070d1bb0a45ad","before":"4c29f0a273310e06144083ae43b51d890f6cf5e4","commits":[{"sha":"09a38bbfede6efdd504e7db5f970e8ddf2b76eff","author":{"email":"10c18fcb898ee6b17d6575d444b125d10b3f4d6a@canonical.com","name":"Tycho Andersen"},"message":"mount: handle tracefs more gracefully\n\nHi guys,\n\nOn Tue, May 17, 2016 at 10:37:22AM -0700, Andrew Vagin wrote:\n> Hi Tycho,\n>\n> Honestly, I don't like this hack. I think it will not work in all cases.\n>\n> For example, we create a clean mount, if an required path is\n> overmounted:\n>\n>         if (&c->siblings != &mi->bind->children) {\n>                 /* Get a copy of mi->bind without child mounts */\n>                 if (mount(mnt_path, mnt_clean_path, NULL, MS_BIND, NULL)) {\n>                         pr_perror(\"Unable to bind-mount %s to %s\",\n>                                         mi->bind->mountpoint, mnt_clean_path);\n>                 }\n>                 mnt_path = mnt_clean_path;\n>                 umount_mnt_path = true;\n>         }\n>\n> so if we will create a clean mount for debugfs, we will lost tracefs.\n>\n> Do you bind-mount debugfs from host in a container? If it's yes, you probably\n> use --mnt-ext-map options for it. Maybe we can add recursive external mounts\n> or something like this.\n\n>From our IRC discussion, avagin suggested,\n\navagin | --mnt-ext-map xxx:yyy:opts\n\nwhich is fine with me. For now, we only need a few options:\n\n'r' == MS_REC\n'i' == ignore the mount on dump (i.e. don't even put it in the images)\n\nwith a combination of these two options, I think that we can make the\ntracefs case work without any other changes to CRIU.\n\nOne other thing I noticed is that --ext-mount-map splits on `:`, which\nwill be wrong for paths with a `:` in them. Maybe we don't care about\nthat right now, though :)\n\nWhat do you guys think? It will work, but it will require everyone who\nmounts debugfs in a container to handle it this same way, as opposed\nto being in CRIU proper.\n\nAnother way would be to drop the FSTYPE__TRACEFS special case from\nproc_parse.c in the first patch, and add some kind of hook to the\nstruct fstype which says whether or not to record the fs in the dump\nimage (maybe just a different return value from ->parse?). See the\nattached patch for what that would look like.\n\nTycho\n\n>From 8b1720f4bb0a7f1f3716acf8bc090f1780b9ecbc Mon Sep 17 00:00:00 2001\nFrom: Tycho Andersen <tycho.andersen@canonical.com>\nDate: Wed, 4 May 2016 23:01:30 +0000\nSubject: [PATCH 1/2] mount: handle tracefs more gracefully\n\nSee the comment for details, but basically tracefs is automounted by the\nkernel, so we can just mount debugfs with MS_REC and get the right result.\n\nv2: rebase on criu-dev\nv3: don't use a new fstype->flags, just always set MS_REC in debugfs'\n    ->parse\n\nSigned-off-by: Tycho Andersen <tycho.andersen@canonical.com>","distinct":true,"url":"https://api.github.com/repos/criupatchwork/criu/commits/09a38bbfede6efdd504e7db5f970e8ddf2b76eff"},{"sha":"919abc49486e7b5b20998369f2629ae37b729324","author":{"email":"10c18fcb898ee6b17d6575d444b125d10b3f4d6a@canonical.com","name":"Tycho Andersen"},"message":"mount: support recursive bind mounts\n\nThe inital mount() call for a bind mount needs to have the MS_REC flag\npresent if the bind mount is recursive.\n\nSigned-off-by: Tycho Andersen <tycho.andersen@canonical.com>","distinct":true,"url":"https://api.github.com/repos/criupatchwork/criu/commits/919abc49486e7b5b20998369f2629ae37b729324"},{"sha":"080d6b9b36f4a3e01c4f670fa6c070d1bb0a45ad","author":{"email":"74c05afa918858348d6db8037d82fa8124870113@openvz.org","name":"Andrei Vagin"},"message":"https://zdtm.openvz.org/series/127","distinct":true,"url":"https://api.github.com/repos/criupatchwork/criu/commits/080d6b9b36f4a3e01c4f670fa6c070d1bb0a45ad"}]}