Re: [Nbd] Using nbd on Android
- To: Brandon Amos <bamos@...1755...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] Using nbd on Android
- From: Wouter Verhelst <w@...112...>
- Date: Wed, 24 Sep 2014 09:26:42 +0200
- Message-id: <20140924072642.GF26345@...3...>
- In-reply-to: <DE4CF561-39DE-4C1D-AC0D-40F56789A6C5@...1755...>
- References: <2236EE6B-0E9D-43A0-B8B4-89F85EC171AE@...1755...> <20140922075132.GB26345@...3...> <DE4CF561-39DE-4C1D-AC0D-40F56789A6C5@...1755...>
On Mon, Sep 22, 2014 at 07:27:20AM -0400, Brandon Amos wrote:
> Hi Wouter,
>
> > I see you needed to disable use of mlockall() for that. Care to send a
> > patch? This should preferably check for existence of mlockall() in
> > configure, and #ifdef it away if it's not present.
> Sure, I'm happy to send in a patch for this.
> Do you want me to add checks so that the `-swap` option is disabled
> completely in Android, or just to disable the `mlockall` call and throw a
> warning when starting with the swap option on Android?
It's probably best to error out if mlockall() doesn't exist. The reason
for that call is to ensure nbd-client doesn't get swapped out to its own
block device; if one tries to swap to nbd without the client being
memory-locked, this will very likely result in deadlocks.
> The Tor bug tracker has a useful post on this:
> https://trac.torproject.org/projects/tor/ticket/1147
Right.
> > I also noticed you used qemu-nbd rather than nbd-server. Any particular
> > reason for that?
> I'm using nbd with a larger project that uses a custom version of qemu-nbd
> to intercept block device writes. I'm not sure why qemu-nbd was
> chosen in place of nbd-server.
Fair enough.
--
It is easy to love a country that is famous for chocolate and beer
-- Barack Obama, speaking in Brussels, Belgium, 2014-03-26
Reply to: