Response to Greg Black on ZFS & FUSE

Catching up on PLOA I noticed a posting from Greg Black bemoaning the lack of ZFS in Linux so I thought I should make a couple of quick points in response to it.

  1. The CDDL/GPL thing is just down to the fact that their requirements are incompatible (Sun based the CDDL the MPL), so you can’t mix that code. Just have to live with that.
  2. A major issue with ZFS is that there is ongoing patent litigation in the US between Sun and NetApp over it – it’ll be interesting to see what Oracle do when they finally take over Sun (assuming Sun doesn’t expire before the EU regulators comes to a decision on the takeover)
  3. ZFS-FUSE isn’t dead! Whilst Ricardo has stopped work another group has taken up the challenge and there is a new home page for it – http://rudd-o.com/new-projects/zfs – complete with Git repository (no more Mercurial, huzzah!).
  4. The ZFS-FUSE mailing list is active too, if you want to learn more.

Microsoft Hypervisor Code to be Removed from 2.6.33 ?

Chris Smart has pointed out an interesting little titbit in Greg K-H’s “Staging tree status for the .32 kernel merge” blog post:

hv (Microsoft Hyper-V) drivers. Over 200 patches make up the massive cleanup effort needed to just get this code into a semi-sane kernel coding style (someone owes me a bit bottle of rum for that work!) Unfortunately the Microsoft developers seem to have disappeared, and no one is answering my emails. If they do not show back up to claim this driver soon, it will be removed in the 2.6.33 release. So sad…

So after all that hope about MS releasing GPL’d code it turns out to be a one off code dump (presumably to get them out of a license violation hole otherwise they’d be showing more interest) with no intention of doing anything further with it.. 🙁

Ext4 fall down go boom

After a reboot today whilst installing KDE 4.3.1 I noticed the following messages in my kernel (2.6.31-rc8) logs (courtesy of the KDE file watcher that was following /var/log/kern.log):

Sep 6 13:53:10 quad kernel: [ 142.842723] EXT4-fs error (device dm-7): ext4_mb_generate_buddy: EXT4-fs: group 287: 5812 blocks in bitmap, 5418 in gd
Sep 6 13:53:11 quad kernel: [ 143.452041] JBD: Spotted dirty metadata buffer (dev = dm-7, blocknr = 0). There's a risk of filesystem corruption in case of system crash.
Sep 6 13:53:11 quad kernel: [ 143.486915] JBD: Spotted dirty metadata buffer (dev = dm-7, blocknr = 0). There's a risk of filesystem corruption in case of system crash.
Sep 6 13:53:11 quad kernel: [ 143.486942] JBD: Spotted dirty metadata buffer (dev = dm-7, blocknr = 0). There's a risk of filesystem corruption in case of system crash.

That didn’t look too good, so I immediately did a “git pull” and happily found 2.6.31-rc9 was out so built that and then did a dual backup, rsync’ing to my local ZFS-FUSE drive (which takes snapshots so I can go backwards in time) and also an rsnapshot to a USB external disk. Then with trepidation I rebooted and found myself looking at an fsck error on /home due to shared blocks between an image and part of my local clone of Linus’s kernel git tree (d’oh!). Whilst the fsck got the filesystem mountable again it did result in not being able to view the kernel git tree due to missing files so I decided it was far safer to just revert to my latest backup, which worked like a charm (phew!).

Moral of the story – keeping backups is good – keeping lots of backups is even better, especially when running with release candidate kernels! 😉

Kubuntu Users – Shave a Few Seconds Off Your Boot Time

If you’re a KDE Ubuntu user (Kubuntu) you might not know that the standard readahead package (which attempts to speed up boot by preloading the kernel file cache by efficiently reading them in advance) is tuned for the Gnome version of Ubuntu and so will be trying to read a bunch of libraries that are probably not installed on your system. So it’s unlikely to do much for your average KDE user!

However, if when you boot you go into the Grub boot loader and add the “profile” option to the end of your command line (after “quiet” for instance) then it will profile the files used during the startup and create new files in /etc/readahead so that next time you start you’ll actually be preloading the files that will be used on your system. I’ve found it’s shaved over 2.5 seconds off my boot time as recorded by bootchart.

There is a bug in Launchpad for this, it’s 369506 but it hasn’t had a lot of love. 🙁

Android on my FreeRunner

So it’s just over two weeks since I started with Android on my FreeRunner and it’s time for an update. First of all I’m no longer using the Koolu images, they lack echo suppression support and as soon as I found that Michael Trimarchi’s Panicking port of Android does do echo suppression I switched. The added benefit of changing was that Michaels port has fixed the go-slow feel of the Koolu version and feels responsive and usable in most situations (though the soft keyboard is still a little slow).

Good points:

  1. Calls work flawlessly.
  2. SMS works flawlessly (and has a nice interface)
  3. Contacts can be added as shortcuts on the desktop
  4. Wifi works (though WPA2 Enterprise networks need some text file magic)
  5. GPS works nicely (I used GPS-status to see how many satellites it can see)
  6. Bluetooth works – or at least finds devices when scanning – not gone any further with that
  7. Web browser works nicely, even supports Google Gears

Bad points:

  1. NO ACCESS TO THE ANDROID MARKET – the Android Market application is not open source (a decision by Google) so you can’t access any applications hosted there. Whilst there are alternative sources they only have a fraction of the applications so this does limit things.
  2. The phone seems to stop being able to suspend if you define a APN for GPRS/MMS access. Resetting the APN to the defaults (none) fixes it though.
  3. I don’t seem to be able to download MMS/PXT’s – I suspect this is related to the APN issues and I may just not have the right info
  4. Accelerometers don’t appear to work – or at least the marble game I had didn’t react to me tilting the phone.
  5. Battery life doesn’t seem to be quite as good as Qtopia/Qt-Extended/QtMoko – I have to charge every 24 hours at present. That said the later kernels don’t seem to give me quite as long a lifetime as the 2.6.24 based ones so that may not be Androids fault..

But all in all I’m really quite happy with Android on FreeRunner, it easily outshines my previous favourite of Qtopia/Qt-Extended/QtMoko in terms of overall polish and usefulness as a phone! Thanks to all involved in the porting effort, and especially Michael.

Puzzled Why You Can’t Enable “atime” in 2.6.30+ ?

If, like Tim Connors, you’re puzzled about why the kernel isn’t honouring your “norelatime” or “atime” options and is keeping the default “relatime” mount option then be reassured it’s not a kernel bug, it’s a bug in the mount command instead. 😉

Basically to enable the POSIX “atime” behaviour again (for those few cases which require it) the mount command needs to pass the MS_STRICTATIME option to the mount(2) syscall, but it appears that the version in the mainstream distributions is too old to do this. There is already a Fedora bug to backport this, and Tim has just reassigned his existing one to mount.

I Can Haz Android (on an OpenMoko Freerunner)

I have been assimilated. Or at least my OpenMoko Freerunner has been! It’s now running the Koolu port of Android 1.5 “Cupcake” on it, and with a *very* helpful hint from Damian Spriggs on the OpenMoko community mailing list it’s able to make and receive calls and SMS’s. For the record you need to get ADB working and grab a root shell on the phone. Then you can use the sqlite command line utility to set the “provisioned” flag in its DB.

# sqlite3 /data/data/com.android.providers.settings/databases/settings.db
SQLite version 3.5.9
Enter ".help" for instructions
sqlite> INSERT INTO secure (name, value) VALUES ('device_provisioned', 1);

I’ve also found a rather nice application called VCardIO for importing my contacts exported in VCard v2.1 format from KDE’s Kontact addressbook. Now we’ll see how it goes over the next few days!

A New TTY Maintainer for Linux

After the recent orphaning of the Linux TTY code there was speculation about who, if anyone, would be mad enough to take it up next. Well just merged in Linus’s git repository is the answer:

commit 57d7f282271a83fe4ca4bd15eee79be577210210
Author: Greg Kroah-Hartman 
Date:   Fri Jul 31 21:28:16 2009 -0700

    TTY: Maintainer change

    Clearly, I am a glutton for punishment.  I'll see if I can see Alan's
    changes through to the end, otherwise I'll be fending off a lot of bug
    reports for usb-serial devices.

    Cc: Alan Cox 
    Signed-off-by: Greg Kroah-Hartman 
    Signed-off-by: Linus Torvalds 

So the self-described “Maintainer of Crap” has added some more dodgy code to his collection.. 😉

So a big round of applause to Alan Cox for starting this dirty nasty work off and another big vote of thanks to Greg for picking it up. A raspberry to Linus for annoying Alan enough to make him give up on a really really tough job. 🙁

Firefox 3.5 0day Vulnerability

Oh joy, within 24 hours of the MS IE/ActiveX exploit we have a remote vulnerability against Firefox 3.5.

The vulnerability is caused due to an error when processing JavaScript code handling e.g. “font” HTML tags and can be exploited to cause a memory corruption. Successful exploitation allows execution of arbitrary code. The vulnerability is confirmed in version 3.5. Other versions may also be affected.

Currently Mozilla have no “known vulnerability” page for Firefox 3.5 security issues, I presume once it’s created it’ll be here.

There is a sample exploit available already, so it’ll be in the wild soon if not already. 🙁

Linux Based Open-PC Project Launched

The KDE News website has the announcement of a new Open-PC project to create a PC shipped with Linux and other FOSS software. Why another ? Well, as they say:

The project was initiated in response to the lack of quality in the Free Software-based hardware solutions currently on the market. As many reviewers and end-users have stated, the pre-installed software used by hardware vendors generated a bad image for Free Software with potentially interested end-users. Much of the software was buggy and not widely tested and device drivers were often unstable, non-free or not available at all.

There’s a lot of questions to answer yet – what form factor, what software, etc – so they are running a survey to try and gauge peoples thoughts. The site says there is a second survey planned for a later date, presumably focusing in on options once they’ve got general ideas. The other interesting thing is that they’ve apparently already got a major PC manufacturer lined up and they are aiming to be shipping by late 2009 with part of the profits going to funding FOSS projects.

There is more information in Frank Karlitschek’s presentation (PDF) from the Desktop Summit in Gran Canaria.