--- /dev/null
+From 72fca4a4b32dc778b5b885c3498700e42b610d49 Mon Sep 17 00:00:00 2001
+From: Jan Luebbe <jlu@pengutronix.de>
+Date: Mon, 4 Feb 2013 14:28:53 -0800
+Subject: drivers/rtc/rtc-isl1208.c: call rtc_update_irq() from the alarm irq handler
+
+From: Jan Luebbe <jlu@pengutronix.de>
+
+commit 72fca4a4b32dc778b5b885c3498700e42b610d49 upstream.
+
+Previously the alarm event was not propagated into the RTC subsystem.
+By adding a call to rtc_update_irq, this fixes a timeout problem with
+the hwclock utility.
+
+Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
+Cc: Alessandro Zummo <a.zummo@towertech.it>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/rtc/rtc-isl1208.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/rtc/rtc-isl1208.c
++++ b/drivers/rtc/rtc-isl1208.c
+@@ -494,6 +494,7 @@ isl1208_rtc_interrupt(int irq, void *dat
+ {
+ unsigned long timeout = jiffies + msecs_to_jiffies(1000);
+ struct i2c_client *client = data;
++ struct rtc_device *rtc = i2c_get_clientdata(client);
+ int handled = 0, sr, err;
+
+ /*
+@@ -516,6 +517,8 @@ isl1208_rtc_interrupt(int irq, void *dat
+ if (sr & ISL1208_REG_SR_ALM) {
+ dev_dbg(&client->dev, "alarm!\n");
+
++ rtc_update_irq(rtc, 1, RTC_IRQF | RTC_AF);
++
+ /* Clear the alarm */
+ sr &= ~ISL1208_REG_SR_ALM;
+ sr = i2c_smbus_write_byte_data(client, ISL1208_REG_SR, sr);
--- /dev/null
+From a9bae189542e71f91e61a4428adf6e5a7dfe8063 Mon Sep 17 00:00:00 2001
+From: Vyacheslav Dubeyko <slava@dubeyko.com>
+Date: Mon, 4 Feb 2013 14:28:41 -0800
+Subject: nilfs2: fix fix very long mount time issue
+
+From: Vyacheslav Dubeyko <slava@dubeyko.com>
+
+commit a9bae189542e71f91e61a4428adf6e5a7dfe8063 upstream.
+
+There exists a situation when GC can work in background alone without
+any other filesystem activity during significant time.
+
+The nilfs_clean_segments() method calls nilfs_segctor_construct() that
+updates superblocks in the case of NILFS_SC_SUPER_ROOT and
+THE_NILFS_DISCONTINUED flags are set. But when GC is working alone the
+nilfs_clean_segments() is called with unset THE_NILFS_DISCONTINUED flag.
+As a result, the update of superblocks doesn't occurred all this time
+and in the case of SPOR superblocks keep very old values of last super
+root placement.
+
+SYMPTOMS:
+
+Trying to mount a NILFS2 volume after SPOR in such environment ends with
+very long mounting time (it can achieve about several hours in some
+cases).
+
+REPRODUCING PATH:
+
+1. It needs to use external USB HDD, disable automount and doesn't
+ make any additional filesystem activity on the NILFS2 volume.
+
+2. Generate temporary file with size about 100 - 500 GB (for example,
+ dd if=/dev/zero of=<file_name> bs=1073741824 count=200). The size of
+ file defines duration of GC working.
+
+3. Then it needs to delete file.
+
+4. Start GC manually by means of command "nilfs-clean -p 0". When you
+ start GC by means of such way then, at the end, superblocks is updated
+ by once. So, for simulation of SPOR, it needs to wait sometime (15 -
+ 40 minutes) and simply switch off USB HDD manually.
+
+5. Switch on USB HDD again and try to mount NILFS2 volume. As a
+ result, NILFS2 volume will mount during very long time.
+
+REPRODUCIBILITY: 100%
+
+FIX:
+
+This patch adds checking that superblocks need to update and set
+THE_NILFS_DISCONTINUED flag before nilfs_clean_segments() call.
+
+Reported-by: Sergey Alexandrov <splavgm@gmail.com>
+Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com>
+Tested-by: Vyacheslav Dubeyko <slava@dubeyko.com>
+Acked-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
+Tested-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/nilfs2/ioctl.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/fs/nilfs2/ioctl.c
++++ b/fs/nilfs2/ioctl.c
+@@ -666,8 +666,11 @@ static int nilfs_ioctl_clean_segments(st
+ if (ret < 0)
+ printk(KERN_ERR "NILFS: GC failed during preparation: "
+ "cannot read source blocks: err=%d\n", ret);
+- else
++ else {
++ if (nilfs_sb_need_update(nilfs))
++ set_nilfs_discontinued(nilfs);
+ ret = nilfs_clean_segments(inode->i_sb, argv, kbufs);
++ }
+
+ nilfs_remove_all_gcinodes(nilfs);
+ clear_nilfs_gc_running(nilfs);