]> git.pld-linux.org Git - packages/kernel.git/commitdiff
- tuxonice 3.1
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 16 Mar 2010 19:12:12 +0000 (19:12 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    kernel-tuxonice.patch -> 1.11
    kernel.spec -> 1.776

kernel-tuxonice.patch
kernel.spec

index 33b64e6a642d904b1bd516f7b7baae93439cb54c..fdd7bee0d9033da02ea3dd9e2bce0519058faa25 100644 (file)
@@ -1,8 +1,8 @@
 diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
-index 736d456..c3048d7 100644
+index e7848a0..616afc2 100644
 --- a/Documentation/kernel-parameters.txt
 +++ b/Documentation/kernel-parameters.txt
-@@ -2694,6 +2694,9 @@ and is between 256 and 4096 characters. It is defined in the file
+@@ -2703,6 +2703,9 @@ and is between 256 and 4096 characters. It is defined in the file
                                        medium is write-protected).
                        Example: quirks=0419:aaf5:rl,0421:0433:rc
  
@@ -1450,10 +1450,10 @@ index 0000000..3bf0575
 +   testing. His efforts have contributed as much to TuxOnIce as any of the
 +   names above.
 diff --git a/MAINTAINERS b/MAINTAINERS
-index 03f38c1..0087fd5 100644
+index 2533fc4..e14223f 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -5378,6 +5378,13 @@ S:      Maintained
+@@ -5380,6 +5380,13 @@ S:      Maintained
  F:    drivers/tc/
  F:    include/linux/tc.h
  
@@ -1585,7 +1585,7 @@ index cb2d515..f35a848 100644
  obj-$(CONFIG_BLK_DEV_BSG)     += bsg.o
  obj-$(CONFIG_BLK_CGROUP)      += blk-cgroup.o
 diff --git a/block/blk-core.c b/block/blk-core.c
-index 718897e..70b4bd9 100644
+index d1a9a0a..d229a5b 100644
 --- a/block/blk-core.c
 +++ b/block/blk-core.c
 @@ -37,6 +37,9 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(block_remap);
@@ -2647,10 +2647,10 @@ index 8bf3770..f1d1e03 100644
                goto free;
  
 diff --git a/drivers/md/md.c b/drivers/md/md.c
-index dd3dfe4..6b62cef 100644
+index a20a71e..6f221e5 100644
 --- a/drivers/md/md.c
 +++ b/drivers/md/md.c
-@@ -6473,6 +6473,9 @@ void md_do_sync(mddev_t *mddev)
+@@ -6469,6 +6469,9 @@ void md_do_sync(mddev_t *mddev)
                mddev->curr_resync = 2;
  
        try_again:
@@ -2660,7 +2660,7 @@ index dd3dfe4..6b62cef 100644
                if (kthread_should_stop())
                        set_bit(MD_RECOVERY_INTR, &mddev->recovery);
  
-@@ -6495,6 +6498,10 @@ void md_do_sync(mddev_t *mddev)
+@@ -6491,6 +6494,10 @@ void md_do_sync(mddev_t *mddev)
                                         * time 'round when curr_resync == 2
                                         */
                                        continue;
@@ -2671,7 +2671,7 @@ index dd3dfe4..6b62cef 100644
                                /* We need to wait 'interruptible' so as not to
                                 * contribute to the load average, and not to
                                 * be caught by 'softlockup'
-@@ -6507,6 +6514,7 @@ void md_do_sync(mddev_t *mddev)
+@@ -6503,6 +6510,7 @@ void md_do_sync(mddev_t *mddev)
                                               " share one or more physical units)\n",
                                               desc, mdname(mddev), mdname(mddev2));
                                        mddev_put(mddev2);
@@ -2679,7 +2679,7 @@ index dd3dfe4..6b62cef 100644
                                        if (signal_pending(current))
                                                flush_signals(current);
                                        schedule();
-@@ -6616,6 +6624,9 @@ void md_do_sync(mddev_t *mddev)
+@@ -6612,6 +6620,9 @@ void md_do_sync(mddev_t *mddev)
                                                 || kthread_should_stop());
                }
  
@@ -2689,7 +2689,7 @@ index dd3dfe4..6b62cef 100644
                if (kthread_should_stop())
                        goto interrupted;
  
-@@ -6660,6 +6671,9 @@ void md_do_sync(mddev_t *mddev)
+@@ -6656,6 +6667,9 @@ void md_do_sync(mddev_t *mddev)
                        last_mark = next;
                }
  
@@ -2700,10 +2700,10 @@ index dd3dfe4..6b62cef 100644
                if (kthread_should_stop())
                        goto interrupted;
 diff --git a/fs/block_dev.c b/fs/block_dev.c
-index 73d6a73..2e80ea9 100644
+index d11d028..b2388cc 100644
 --- a/fs/block_dev.c
 +++ b/fs/block_dev.c
-@@ -334,6 +334,93 @@ out_unlock:
+@@ -335,6 +335,93 @@ out_unlock:
  }
  EXPORT_SYMBOL(thaw_bdev);
  
@@ -3163,10 +3163,10 @@ index 1a822ce..9b69d61 100644
  
  static inline int register_fuseblk(void)
 diff --git a/fs/namei.c b/fs/namei.c
-index 94a5e60..17c839b 100644
+index a4855af..3d57581 100644
 --- a/fs/namei.c
 +++ b/fs/namei.c
-@@ -2260,6 +2260,8 @@ int vfs_unlink(struct inode *dir, struct dentry *dentry)
+@@ -2268,6 +2268,8 @@ int vfs_unlink(struct inode *dir, struct dentry *dentry)
        if (!dir->i_op->unlink)
                return -EPERM;
  
@@ -3250,7 +3250,7 @@ index 5a361f8..a66f2a9 100644
  static inline void freezer_do_not_count(void) {}
  static inline void freezer_count(void) {}
 diff --git a/include/linux/fs.h b/include/linux/fs.h
-index b1bcb27..f6343be 100644
+index ebb1cd5..e30e318 100644
 --- a/include/linux/fs.h
 +++ b/include/linux/fs.h
 @@ -173,6 +173,7 @@ struct inodes_stat_t {
@@ -3515,7 +3515,7 @@ index 614241b..f3ea292 100644
        sys_fchdir(old_fd);
        sys_mount("/", ".", NULL, MS_MOVE, NULL);
 diff --git a/init/main.c b/init/main.c
-index dac44a9..1879ca9 100644
+index 4cb47a1..36eac80 100644
 --- a/init/main.c
 +++ b/init/main.c
 @@ -116,6 +116,7 @@ extern void softirq_init(void);
@@ -4813,7 +4813,7 @@ index 6f10dfc..cecd9a8 100644
   *    suspend_finish - Do final work before exiting suspend sequence.
 diff --git a/kernel/power/tuxonice.h b/kernel/power/tuxonice.h
 new file mode 100644
-index 0000000..5a17e10
+index 0000000..e7bc111
 --- /dev/null
 +++ b/kernel/power/tuxonice.h
 @@ -0,0 +1,211 @@
@@ -4840,7 +4840,7 @@ index 0000000..5a17e10
 +#include "tuxonice_pageflags.h"
 +#include "power.h"
 +
-+#define TOI_CORE_VERSION "3.0.99.48"
++#define TOI_CORE_VERSION "3.1"
 +#define       TOI_HEADER_VERSION 2
 +#define MY_BOOT_KERNEL_DATA_VERSION 3
 +
@@ -5939,7 +5939,7 @@ index 0000000..9627ccc
 +};
 diff --git a/kernel/power/tuxonice_bio_chains.c b/kernel/power/tuxonice_bio_chains.c
 new file mode 100644
-index 0000000..5ee97b7
+index 0000000..2ac2042
 --- /dev/null
 +++ b/kernel/power/tuxonice_bio_chains.c
 @@ -0,0 +1,1044 @@
@@ -6098,7 +6098,7 @@ index 0000000..5ee97b7
 +      int i;
 +
 +      if (!toi_writer_posn.current_chain)
-+              return -ENODATA;
++              return -ENOSPC;
 +
 +      /* Assume chains always have lengths that are multiples of @blocks */
 +      for (i = 0; i < blocks; i++)
@@ -6109,7 +6109,7 @@ index 0000000..5ee97b7
 +          !toi_writer_posn.current_chain->blocks.current_extent)
 +              find_next_chain();
 +
-+      return  toi_writer_posn.current_chain ? 0 : -ENODATA;
++      return  toi_writer_posn.current_chain ? 0 : -ENOSPC;
 +}
 +
 +static void toi_insert_chain_in_prio_list(struct toi_bdev_info *this)
@@ -6722,7 +6722,7 @@ index 0000000..5ee97b7
 +              }
 +              toi_message(TOI_IO, TOI_VERBOSE, 0, "Ran out of extents to "
 +                              "read/write. (Not necessarily a fatal error.");
-+              return -ENODATA;
++              return -ENOSPC;
 +      }
 +
 +      return 0;
@@ -6762,7 +6762,7 @@ index 0000000..5ee97b7
 +      if (result) {
 +              toi_message(TOI_IO, TOI_VERBOSE, 0, "Seeking to read/write "
 +                              "another page when stream has ended.");
-+              return -ENODATA;
++              return -ENOSPC;
 +      }
 +
 +      toi_message(TOI_IO, TOI_VERBOSE, 0,
@@ -6831,7 +6831,7 @@ index 0000000..5ee97b7
 +
 +      for (i = 0; i < header_pages_reserved; i++)
 +              if (go_next_page(1, 0))
-+                      return -ENODATA;
++                      return -ENOSPC;
 +
 +      /* The end of header pages will be the start of pageset 2 */
 +      toi_extent_state_save(2);
@@ -6989,10 +6989,10 @@ index 0000000..5ee97b7
 +}
 diff --git a/kernel/power/tuxonice_bio_core.c b/kernel/power/tuxonice_bio_core.c
 new file mode 100644
-index 0000000..6bb7887
+index 0000000..b8ae996
 --- /dev/null
 +++ b/kernel/power/tuxonice_bio_core.c
-@@ -0,0 +1,1806 @@
+@@ -0,0 +1,1810 @@
 +/*
 + * kernel/power/tuxonice_bio.c
 + *
@@ -7224,7 +7224,8 @@ index 0000000..6bb7887
 +
 +      /* Getting low on memory and I/O is in progress? */
 +      while (unlikely(free_pages < free_mem_throttle) &&
-+                      atomic_read(&toi_io_in_progress)) {
++                      atomic_read(&toi_io_in_progress) &&
++                      !test_result_state(TOI_ABORTED)) {
 +              if (!(flags & THROTTLE_WAIT))
 +                      return -ENOMEM;
 +              do_bio_wait(4);
@@ -7232,7 +7233,8 @@ index 0000000..6bb7887
 +      }
 +
 +      while (!(flags & MEMORY_ONLY) && throughput_throttle &&
-+              TOTAL_OUTSTANDING_IO >= throughput_throttle) {
++              TOTAL_OUTSTANDING_IO >= throughput_throttle &&
++              !test_result_state(TOI_ABORTED)) {
 +              int result = toi_bio_queue_flush_pages(0);
 +              if (result)
 +                      return result;
@@ -7621,16 +7623,15 @@ index 0000000..6bb7887
 + **/
 +static int toi_rw_cleanup(int writing)
 +{
-+      int i, result;
++      int i, result = 0;
 +
 +      toi_message(TOI_IO, TOI_VERBOSE, 0, "toi_rw_cleanup.");
 +      if (writing) {
-+              int result;
-+
 +              if (toi_writer_buffer_posn && !test_result_state(TOI_ABORTED))
 +                      toi_bio_queue_write(&toi_writer_buffer);
 +
-+              result = toi_bio_queue_flush_pages(0);
++              while (bio_queue_head && !result)
++                      result = toi_bio_queue_flush_pages(0);
 +
 +              if (result)
 +                      return result;
@@ -7701,11 +7702,11 @@ index 0000000..6bb7887
 +      }
 +
 +      result = toi_bio_rw_page(READ, virt_to_page(buffer), 1, 0);
-+      if (result == -ENODATA)
++      if (result == -ENOSPC)
 +              toi__free_page(12, virt_to_page(buffer));
 +      mutex_unlock(&toi_bio_readahead_mutex);
 +      if (result) {
-+              if (result == -ENODATA)
++              if (result == -ENOSPC)
 +                      toi_message(TOI_IO, TOI_VERBOSE, 0,
 +                                      "Last readahead page submitted.");
 +              else
@@ -7744,7 +7745,7 @@ index 0000000..6bb7887
 +              last_result = toi_start_one_readahead(dedicated_thread);
 +
 +              if (last_result) {
-+                      if (last_result == -ENOMEM || last_result == -ENODATA)
++                      if (last_result == -ENOMEM || last_result == -ENOSPC)
 +                              return 0;
 +
 +                      printk(KERN_DEBUG
@@ -7806,7 +7807,7 @@ index 0000000..6bb7887
 +               */
 +              if (!more_readahead) {
 +                      printk(KERN_EMERG "No more readahead.\n");
-+                      return -ENODATA;
++                      return -ENOSPC;
 +              }
 +              if (unlikely(toi_start_one_readahead(0))) {
 +                      printk(KERN_EMERG "No readahead and "
@@ -7866,7 +7867,10 @@ index 0000000..6bb7887
 +                      bio_queue_tail = NULL;
 +              atomic_dec(&toi_bio_queue_size);
 +              spin_unlock_irqrestore(&bio_queue_lock, flags);
-+              result = toi_bio_rw_page(WRITE, page, 0, 11);
++
++              /* Don't generate more error messages if already had one */
++              if (!result)
++                      result = toi_bio_rw_page(WRITE, page, 0, 11);
 +              /*
 +               * If writing the page failed, don't drop out.
 +               * Flush the rest of the queue too.
@@ -11230,7 +11234,7 @@ index 0000000..051feb3
 +
 diff --git a/kernel/power/tuxonice_compress.c b/kernel/power/tuxonice_compress.c
 new file mode 100644
-index 0000000..785f1d5
+index 0000000..6bbc446
 --- /dev/null
 +++ b/kernel/power/tuxonice_compress.c
 @@ -0,0 +1,497 @@
@@ -11460,7 +11464,7 @@ index 0000000..785f1d5
 +
 +      ctx->buffer_start = kmap(buffer_page);
 +
-+      ctx->len = buf_size;
++      ctx->len = PAGE_SIZE;
 +
 +      ret = crypto_comp_compress(ctx->transform,
 +                      ctx->buffer_start, buf_size,
@@ -13733,10 +13737,10 @@ index 0000000..c4bbb49
 +#endif
 diff --git a/kernel/power/tuxonice_io.c b/kernel/power/tuxonice_io.c
 new file mode 100644
-index 0000000..2ce4367
+index 0000000..02be4d9
 --- /dev/null
 +++ b/kernel/power/tuxonice_io.c
-@@ -0,0 +1,1802 @@
+@@ -0,0 +1,1822 @@
 +/*
 + * kernel/power/tuxonice_io.c
 + *
@@ -14155,6 +14159,7 @@ index 0000000..2ce4367
 +                                      "still %d.\n", atomic_read(&io_count));
 +                      BUG();
 +              }
++              mutex_unlock(&io_mutex);
 +              return -ENODATA;
 +      }
 +
@@ -14192,15 +14197,23 @@ index 0000000..2ce4367
 + * @my_io_index: The index of the page in the pageset.
 + * @write_pfn: The pfn in which the data belongs.
 + *
-+ * Read a page of the image into our buffer.
++ * Read a page of the image into our buffer. It can happen (here and in the
++ * write routine) that threads don't get run until after other CPUs have done
++ * all the work. This was the cause of the long standing issue with
++ * occasionally getting -ENODATA errors at the end of reading the image. We
++ * therefore need to check there's actually a page to read before trying to
++ * retrieve one.
 + **/
 +
 +static int read_next_page(int *my_io_index, unsigned long *write_pfn,
 +              struct page *buffer, struct toi_module_ops *first_filter)
 +{
 +      unsigned int buf_size = PAGE_SIZE;
++      unsigned long left = atomic_read(&io_count);
++
++      if (left)
++              *my_io_index = io_finish_at - atomic_sub_return(1, &io_count);
 +
-+      *my_io_index = io_finish_at - atomic_sub_return(1, &io_count);
 +      mutex_unlock(&io_mutex);
 +
 +      /*
@@ -14222,6 +14235,9 @@ index 0000000..2ce4367
 +                      schedule();
 +      }
 +
++      if (!left)
++              return -ENODATA;
++
 +      /*
 +       * See toi_bio_read_page in tuxonice_bio.c:
 +       * read the next page in the image.
@@ -14302,7 +14318,6 @@ index 0000000..2ce4367
 +
 +      current->flags |= PF_NOFREEZE;
 +
-+      atomic_inc(&toi_io_workers);
 +      mutex_lock(&io_mutex);
 +
 +      do {
@@ -14328,8 +14343,12 @@ index 0000000..2ce4367
 +                                      buffer, first_filter);
 +
 +              if (result) {
-+                      io_result = result;
 +                      mutex_lock(&io_mutex);
++                      /* Nothing to do? */
++                      if (result == -ENODATA)
++                              break;
++
++                      io_result = result;
 +
 +                      if (io_write) {
 +                              printk(KERN_INFO "Write chunk returned %d.\n",
@@ -14401,9 +14420,12 @@ index 0000000..2ce4367
 +{
 +      int cpu, num_started = 0;
 +      struct task_struct *p;
++      int to_start = (toi_max_workers ? toi_max_workers : num_online_cpus()) - 1;
++
++      atomic_set(&toi_io_workers, to_start);
 +
 +      for_each_online_cpu(cpu) {
-+              if (toi_max_workers && (num_started + 1) == toi_max_workers)
++              if (num_started == to_start)
 +                      break;
 +
 +              if (cpu == smp_processor_id())
@@ -14413,6 +14435,7 @@ index 0000000..2ce4367
 +                              "ktoi_io/%d", cpu);
 +              if (IS_ERR(p)) {
 +                      printk(KERN_ERR "ktoi_io for %i failed\n", cpu);
++                      atomic_dec(&toi_io_workers);
 +                      continue;
 +              }
 +              kthread_bind(p, cpu);
@@ -14484,9 +14507,10 @@ index 0000000..2ce4367
 +              num_other_threads = start_other_threads();
 +
 +      if (!num_other_threads || !toiActiveAllocator->io_flusher ||
-+              test_action_state(TOI_NO_FLUSHER_THREAD))
++              test_action_state(TOI_NO_FLUSHER_THREAD)) {
++              atomic_inc(&toi_io_workers);
 +              worker_rw_loop(num_other_threads ? NULL : MONITOR);
-+      else
++      else
 +              result = toiActiveAllocator->io_flusher(write);
 +
 +      while (atomic_read(&toi_io_workers))
index 0e92681b6a641be648ed373623416b728d6ff899..97f312c200ccd409ce5928d408144ffee7df17c9 100644 (file)
 
 %define                _enable_debug_packages                  0
 
-%define                tuxonice_version        3.0.1
+%define                tuxonice_version        3.1
 %define                netfilter_snap          20070806
 
 %if %{with myown}
@@ -260,7 +260,7 @@ Patch56:    kernel-atmdd.patch
 Patch59:       kernel-rndis_host-wm5.patch
 
 # Project suspend2 renamed to tuxonice
-# http://www.tuxonice.net/downloads/all/tuxonice-3.0.99.48-for-head.patch.bz2
+# http://www.tuxonice.net/downloads/all/tuxonice-3.1-for-2.6.33.patch.bz2
 Patch69:       kernel-tuxonice.patch
 Patch70:       kernel-tuxonice-headers.patch
 
This page took 0.1133 seconds and 4 git commands to generate.