{"id":178,"date":"2013-03-27T20:24:45","date_gmt":"2013-03-28T04:24:45","guid":{"rendered":"http:\/\/intr.overt.org\/blog\/?p=178"},"modified":"2013-03-27T20:24:45","modified_gmt":"2013-03-28T04:24:45","slug":"gvfs-mtp-updates-direct-io-and-filenames-in-uris","status":"publish","type":"post","link":"https:\/\/blog.intr.overt.org\/?p=178","title":{"rendered":"GVFS MTP Updates: Direct I\/O and filenames in URIs!"},"content":{"rendered":"<p>Hi Everyone,<\/p>\n<p>It&#8217;s been a while since my last update (over a month!) so it&#8217;s a good time to talk about what&#8217;s been going on.<\/p>\n<p>Firstly, GVFS 1.16 is out &#8211; so that&#8217;s the first stable release with the MTP backend in it. w00t!<\/p>\n<p>Before you wonder, it doesn&#8217;t include my work to support the Android Direct I\/O extensions (that allow normal read\/write access to files on the device). I&#8217;ve now got those to a point where I&#8217;m ready to get them in, but I&#8217;m waiting on a review in bugzilla. Since my last update, all the libmtp changes have been merged and released in version 1.1.16.<\/p>\n<p>The second big thing I&#8217;ve done is completely change how mtp URIs work. In previous posts, I&#8217;ve talked about how I was putting entity IDs as path elements to save having to maintain an ID->filename mapping, and then relying on the gvfs display and copy name properties to make the files appear to have normal names when looked at. I ultimately decided to abandon this approach for a couple of reasons. The main one is that with Direct I\/O support, every application that can operate on files can be used with an MTP device, and most of those apps don&#8217;t know anything about gvfs and can&#8217;t use the special properties. The second reason is that there are edge cases where it&#8217;s impossible to tell if you&#8217;re looking at a filename that&#8217;s all numbers or an entity ID. So, I&#8217;ve added a mapping system and URIs now use filenames.<\/p>\n<p>Finally, I&#8217;ve fixed a bug in gvfs that only got triggered when unmounting an mtp device in Ubuntu 13.04 betas. The code in question hasn&#8217;t changed in gvfs for a long time, but the bug didn&#8217;t appear anywhere else. Still, there is a real code problem in there, so I&#8217;ve got a fix out for it.<\/p>\n<p>I&#8217;ve updated my <a href=\"https:\/\/launchpad.net\/~langdalepl\/+archive\/gvfs-mtp\" title=\"ppa\"><\/a> with builds that contain all these pending patches (although the raring gvfs got updated while mine was building so it&#8217;s now considered out-of-date) and the new libmtp, so please try the new stuff out.<\/p>\n<p>For the curious, here are the GNOME bugzilla entries tracking these changes:<\/p>\n<ul>\n<li><a href=\"https:\/\/bugzilla.gnome.org\/show_bug.cgi?id=695984\" title=\"Add support for Android direct I\/O extensions\">Add support for Android direct I\/O extensions<\/a><\/li>\n<li><a href=\"https:\/\/bugzilla.gnome.org\/show_bug.cgi?id=696016\" title=\"Implement filename cache to enable name based URIs\">Implement filename cache to enable name based URIs<\/a><\/li>\n<li><a href=\"https:\/\/bugzilla.gnome.org\/show_bug.cgi?id=696479\" title=\"gvfsmonitor.c: backend_died needs to take a ref while unsubscribing subscribers\">gvfsmonitor.c: backend_died needs to take a ref while unsubscribing subscribers<\/a><\/li>\n<\/ul>\n<p>Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi Everyone, It&#8217;s been a while since my last update (over a month!) so it&#8217;s a good time to talk about what&#8217;s been going on. Firstly, GVFS 1.16 is out &#8211; so that&#8217;s the first stable release with the MTP backend in it. w00t! Before you wonder, it doesn&#8217;t include my work to support the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-178","post","type-post","status-publish","format-standard","hentry","category-the-wonderful-world-of-gnome"],"_links":{"self":[{"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=\/wp\/v2\/posts\/178"}],"collection":[{"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=178"}],"version-history":[{"count":0,"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=\/wp\/v2\/posts\/178\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}