public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: luis jure <ljc@internet.com.uy>
To: gentoo-user <gentoo-user@lists.gentoo.org>
Subject: Re: [gentoo-user] android and mtp
Date: Sat, 22 Dec 2012 10:01:37 -0200	[thread overview]
Message-ID: <20121222100137.2a21405c@acme7.acmenet> (raw)
In-Reply-To: <20121221232036.6df0fd1f@digimed.co.uk>


on 2012-12-21 at 23:20 Neil Bothwick wrote:

> No, and there's a good reason for that.

well, i'm glad to know that there's a good reason to use MTP, because what
i've read so far about it made me wonder...

from the link mark sent earlier:

<quote>
libmtp (and I assume the MTP protocol itself) doesn’t support seeking
within a file or partial file reads or writes. You have to fetch or send
the entire file. To simluate normal random access files, when a file is
opened the entire file contents are copied from the device to a temporary
file. Reads and writes then operate on the temporary file. When the file
is closed (or if a flush or fsync occurs) then if a write has occurred
since the file was last opened the entire contents of the temporary file
are sent back to the device. This means repeatedly opening a file, making
a small change, and closing it again will be very slow.

Renaming or moving a file is implemented by copying the file from the
device, writing it back to the device under the new name, and then
deleting the original file. This makes renames, especially for large
files, slow. This has special significance when using rsync to copy files
to the device. Rsync copies to a temporary file, and then when the copy is
complete it renames the temporary file to the real filename. So when
rsyncing to a jmtpfs filessystem, for each file, the data gets copied to
the device, read back, and then copied to the device again. There is a
true rename (but not move) supported by libmtp, but this appears to
confuse some Android apps, so I don’t use it. Image files, for example,
will disappear from the Gallery if they’re renamed.
</quote>


  reply	other threads:[~2012-12-22 12:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-21 21:56 [gentoo-user] android and mtp luis jure
2012-12-21 22:19 ` Paul Hartman
2012-12-21 23:20   ` Neil Bothwick
2012-12-22 12:01     ` luis jure [this message]
2012-12-22 12:15       ` Alan McKinnon
2012-12-22 12:49         ` luis jure
2012-12-22 15:13           ` Alan McKinnon
2012-12-23 12:17             ` luis jure
2012-12-24  3:54               ` [gentoo-user] " Grant Edwards
2012-12-24  4:54                 ` Nilesh Govindrajan
2012-12-24 18:17                   ` Grant Edwards
2012-12-24 18:31                     ` Michael Mol
2012-12-22 22:57           ` [gentoo-user] " Neil Bothwick
2012-12-23 12:21             ` luis jure
2012-12-22 23:32     ` [gentoo-user] " Grant Edwards
2012-12-23  3:40       ` Nilesh Govindrajan
2012-12-23  3:55       ` Daniel Frey
2012-12-23 23:22         ` luis jure
2012-12-25  5:26           ` Daniel Frey
2012-12-21 22:26 ` [gentoo-user] " Mark Knecht
2012-12-22 11:09   ` luis jure
2012-12-22 17:51     ` Mark Knecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121222100137.2a21405c@acme7.acmenet \
    --to=ljc@internet.com.uy \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox