[kernel] r10916 - in dists/etch/linux-2.6/debian: . patches/bugfix patches/series

2008-03-18 Thread Dann Frazier
Author: dannf
Date: Tue Mar 18 06:04:32 2008
New Revision: 10916

Log:
* Fix potential nfs write corruption (closes: #470719)

Added:
   dists/etch/linux-2.6/debian/patches/bugfix/nfs-write-corruption.patch
Modified:
   dists/etch/linux-2.6/debian/changelog
   dists/etch/linux-2.6/debian/patches/series/19

Modified: dists/etch/linux-2.6/debian/changelog
==
--- dists/etch/linux-2.6/debian/changelog   (original)
+++ dists/etch/linux-2.6/debian/changelog   Tue Mar 18 06:04:32 2008
@@ -5,8 +5,9 @@
 
   [ dann frazier ]
   * e1000: Add PCI-IDs for 82571EB 4-port cards (closes: #466401).
+  * Fix potential nfs write corruption (closes: #470719)
 
- -- dann frazier [EMAIL PROTECTED]  Thu, 28 Feb 2008 17:26:31 -0700
+ -- dann frazier [EMAIL PROTECTED]  Sun, 16 Mar 2008 20:57:06 -0600
 
 linux-2.6 (2.6.18.dfsg.1-18) stable; urgency=high
 

Added: dists/etch/linux-2.6/debian/patches/bugfix/nfs-write-corruption.patch
==
--- (empty file)
+++ dists/etch/linux-2.6/debian/patches/bugfix/nfs-write-corruption.patch   
Tue Mar 18 06:04:32 2008
@@ -0,0 +1,76 @@
+From: Trond Myklebust [EMAIL PROTECTED]
+Date: Thu, 7 Feb 2008 22:24:07 + (-0500)
+Subject: NFS: Fix a potential file corruption issue when writing
+X-Git-Tag: v2.6.25-rc1~286^2~1
+X-Git-Url: 
http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=5d47a35600270e7115061cb1320ee60ae9bcb6b8
+
+NFS: Fix a potential file corruption issue when writing
+
+If the inode is flagged as having an invalid mapping, then we can't rely on
+the PageUptodate() flag. Ensure that we don't use the anti-fragmentation
+write optimisation in nfs_updatepage(), since that will cause NFS to write
+out areas of the page that are no longer guaranteed to be up to date.
+
+A potential corruption could occur in the following scenario:
+
+client 1   client 2
+======
+   fd=open(f,O_CREAT|O_WRONLY,0644);
+   write(fd,fubar\n,6);  // cache last page
+   close(fd);
+fd=open(f,O_WRONLY|O_APPEND);
+write(fd,foo\n,4);
+close(fd);
+
+   fd=open(f,O_WRONLY|O_APPEND);
+   write(fd,bar\n,4);
+   close(fd);
+-
+The bug may lead to the file f reading 'fubar\n\0\0\0\nbar\n' because
+client 2 does not update the cached page after re-opening the file for
+write. Instead it keeps it marked as PageUptodate() until someone calls
+invaldate_inode_pages2() (typically by calling read()).
+
+Signed-off-by: Trond Myklebust [EMAIL PROTECTED]
+---
+
+Backported to Debian's 2.6.18 by dann frazier [EMAIL PROTECTED]
+
+diff -urpN linux-source-2.6.18.orig/fs/nfs/write.c 
linux-source-2.6.18/fs/nfs/write.c
+--- linux-source-2.6.18.orig/fs/nfs/write.c2006-09-19 21:42:06.0 
-0600
 linux-source-2.6.18/fs/nfs/write.c 2008-03-13 01:16:30.0 -0600
+@@ -805,6 +805,17 @@ int nfs_flush_incompatible(struct file *
+ }
+ 
+ /*
++ * If the page cache is marked as unsafe or invalid, then we can't rely on
++ * the PageUptodate() flag. In this case, we will need to turn off
++ * write optimisations that depend on the page contents being correct.
++ */
++static int nfs_write_pageuptodate(struct page *page, struct inode *inode)
++{
++  return PageUptodate(page) 
++  !(NFS_I(inode)-cache_validity  
(NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_DATA));
++}
++
++/*
+  * Update and possibly write a cached page of an NFS file.
+  *
+  * XXX: Keep an eye on generic_file_read to make sure it doesn't do bad
+@@ -836,10 +847,13 @@ int nfs_updatepage(struct file *file, st
+   }
+ 
+   /* If we're not using byte range locks, and we know the page
+-   * is entirely in cache, it may be more efficient to avoid
+-   * fragmenting write requests.
++   * is up to date, it may be more efficient to extend the write
++   * to cover the entire page in order to avoid fragmentation
++   * inefficiencies.
+*/
+-  if (PageUptodate(page)  inode-i_flock == NULL  !(file-f_mode  
O_SYNC)) {
++  if (nfs_write_pageuptodate(page, inode) 
++  inode-i_flock == NULL 
++  !(file-f_flags  O_SYNC)) {
+   loff_t end_offs = i_size_read(inode) - 1;
+   unsigned long end_index = end_offs  PAGE_CACHE_SHIFT;
+ 

Modified: dists/etch/linux-2.6/debian/patches/series/19
==
--- dists/etch/linux-2.6/debian/patches/series/19   (original)
+++ dists/etch/linux-2.6/debian/patches/series/19   Tue Mar 18 06:04:32 2008
@@ -1,2 +1,3 @@
 + bugfix/mips/cobalt-raq1-uart.patch
 + features/e1000-quad-82571EB-ids.patch
++ 

[kernel] r10917 - dists/trunk/linux-2.6/debian/config/i386

2008-03-18 Thread Maximilian Attems
Author: maks
Date: Tue Mar 18 12:57:07 2008
New Revision: 10917

Log:
i386: set R3964

got lost somehow in reorg.


Modified:
   dists/trunk/linux-2.6/debian/config/i386/config

Modified: dists/trunk/linux-2.6/debian/config/i386/config
==
--- dists/trunk/linux-2.6/debian/config/i386/config (original)
+++ dists/trunk/linux-2.6/debian/config/i386/config Tue Mar 18 12:57:07 2008
@@ -317,6 +317,7 @@
 CONFIG_GEN_RTC=m
 CONFIG_GEN_RTC_X=y
 CONFIG_DTLK=m
+CONFIG_R3964=m
 CONFIG_APPLICOM=m
 CONFIG_SONYPI=m
 CONFIG_MWAVE=m

___
Kernel-svn-changes mailing list
Kernel-svn-changes@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/kernel-svn-changes


[kernel] r10918 - in dists/trunk/linux-2.6/debian/config: amd64 i386

2008-03-18 Thread Maximilian Attems
Author: maks
Date: Tue Mar 18 12:57:11 2008
New Revision: 10918

Log:
x86: reset DECNET_NF_GRABULATOR

option got lost in reorg..


Modified:
   dists/trunk/linux-2.6/debian/config/amd64/config
   dists/trunk/linux-2.6/debian/config/i386/config

Modified: dists/trunk/linux-2.6/debian/config/amd64/config
==
--- dists/trunk/linux-2.6/debian/config/amd64/config(original)
+++ dists/trunk/linux-2.6/debian/config/amd64/configTue Mar 18 12:57:11 2008
@@ -1519,6 +1519,11 @@
 # CONFIG_DECNET_ROUTER is not set
 
 ##
+## file: net/decnet/netfilter/Kconfig
+##
+CONFIG_DECNET_NF_GRABULATOR=m
+
+##
 ## file: net/econet/Kconfig
 ##
 CONFIG_ECONET=m

Modified: dists/trunk/linux-2.6/debian/config/i386/config
==
--- dists/trunk/linux-2.6/debian/config/i386/config (original)
+++ dists/trunk/linux-2.6/debian/config/i386/config Tue Mar 18 12:57:11 2008
@@ -1785,6 +1785,11 @@
 # CONFIG_DECNET_ROUTER is not set
 
 ##
+## file: net/decnet/netfilter/Kconfig
+##
+CONFIG_DECNET_NF_GRABULATOR=m
+
+##
 ## file: net/econet/Kconfig
 ##
 CONFIG_ECONET=m

___
Kernel-svn-changes mailing list
Kernel-svn-changes@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/kernel-svn-changes


[kernel] r10919 - in dists/trunk/linux-2.6/debian/patches: bugfix/all series

2008-03-18 Thread Maximilian Attems
Author: maks
Date: Tue Mar 18 13:46:27 2008
New Revision: 10919

Log:
update to 2.6.25-rc6-git1

ata merge, no conflicts.


Added:
   dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-rc6-git1
Modified:
   dists/trunk/linux-2.6/debian/patches/series/1~experimental.1

Added: dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-rc6-git1
==
--- (empty file)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-rc6-git1   
Tue Mar 18 13:46:27 2008
@@ -0,0 +1,566 @@
+diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
+index 6978469..17ee6ed 100644
+--- a/drivers/ata/ahci.c
 b/drivers/ata/ahci.c
+@@ -49,6 +49,10 @@
+ #define DRV_NAME  ahci
+ #define DRV_VERSION   3.0
+ 
++static int ahci_skip_host_reset;
++module_param_named(skip_host_reset, ahci_skip_host_reset, int, 0444);
++MODULE_PARM_DESC(skip_host_reset, skip global host reset (0=don't skip, 
1=skip));
++
+ static int ahci_enable_alpm(struct ata_port *ap,
+   enum link_pm policy);
+ static void ahci_disable_alpm(struct ata_port *ap);
+@@ -587,6 +591,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
+ 
+   /* Marvell */
+   { PCI_VDEVICE(MARVELL, 0x6145), board_ahci_mv },/* 6145 */
++  { PCI_VDEVICE(MARVELL, 0x6121), board_ahci_mv },/* 6121 */
+ 
+   /* Generic, PCI class code for AHCI */
+   { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
+@@ -661,6 +666,7 @@ static void ahci_save_initial_config(struct pci_dev *pdev,
+   void __iomem *mmio = pcim_iomap_table(pdev)[AHCI_PCI_BAR];
+   u32 cap, port_map;
+   int i;
++  int mv;
+ 
+   /* make sure AHCI mode is enabled before accessing CAP */
+   ahci_enable_ahci(mmio);
+@@ -696,12 +702,16 @@ static void ahci_save_initial_config(struct pci_dev 
*pdev,
+* presence register, as bit 4 (counting from 0)
+*/
+   if (hpriv-flags  AHCI_HFLAG_MV_PATA) {
++  if (pdev-device == 0x6121)
++  mv = 0x3;
++  else
++  mv = 0xf;
+   dev_printk(KERN_ERR, pdev-dev,
+  MV_AHCI HACK: port_map %x - %x\n,
+- hpriv-port_map,
+- hpriv-port_map  0xf);
++ port_map,
++ port_map  mv);
+ 
+-  port_map = 0xf;
++  port_map = mv;
+   }
+ 
+   /* cross check port_map and cap.n_ports */
+@@ -1088,29 +1098,35 @@ static int ahci_reset_controller(struct ata_host *host)
+   ahci_enable_ahci(mmio);
+ 
+   /* global controller reset */
+-  tmp = readl(mmio + HOST_CTL);
+-  if ((tmp  HOST_RESET) == 0) {
+-  writel(tmp | HOST_RESET, mmio + HOST_CTL);
+-  readl(mmio + HOST_CTL); /* flush */
+-  }
++  if (!ahci_skip_host_reset) {
++  tmp = readl(mmio + HOST_CTL);
++  if ((tmp  HOST_RESET) == 0) {
++  writel(tmp | HOST_RESET, mmio + HOST_CTL);
++  readl(mmio + HOST_CTL); /* flush */
++  }
+ 
+-  /* reset must complete within 1 second, or
+-   * the hardware should be considered fried.
+-   */
+-  ssleep(1);
++  /* reset must complete within 1 second, or
++   * the hardware should be considered fried.
++   */
++  ssleep(1);
+ 
+-  tmp = readl(mmio + HOST_CTL);
+-  if (tmp  HOST_RESET) {
+-  dev_printk(KERN_ERR, host-dev,
+- controller reset failed (0x%x)\n, tmp);
+-  return -EIO;
+-  }
++  tmp = readl(mmio + HOST_CTL);
++  if (tmp  HOST_RESET) {
++  dev_printk(KERN_ERR, host-dev,
++ controller reset failed (0x%x)\n, tmp);
++  return -EIO;
++  }
+ 
+-  /* turn on AHCI mode */
+-  ahci_enable_ahci(mmio);
++  /* turn on AHCI mode */
++  ahci_enable_ahci(mmio);
+ 
+-  /* some registers might be cleared on reset.  restore initial values */
+-  ahci_restore_initial_config(host);
++  /* Some registers might be cleared on reset.  Restore
++   * initial values.
++   */
++  ahci_restore_initial_config(host);
++  } else
++  dev_printk(KERN_INFO, host-dev,
++ skipping global host reset\n);
+ 
+   if (pdev-vendor == PCI_VENDOR_ID_INTEL) {
+   u16 tmp16;
+@@ -1162,9 +1178,14 @@ static void ahci_init_controller(struct ata_host *host)
+   int i;
+   void __iomem *port_mmio;
+   u32 tmp;
++  int mv;
+ 
+   if (hpriv-flags  AHCI_HFLAG_MV_PATA) {
+-  port_mmio = __ahci_port_base(host, 4);
++  if (pdev-device == 0x6121)
++  mv = 2;
++  else
++  mv = 

[kernel] r10920 - in dists/trunk/linux-2.6/debian/config: arm armel

2008-03-18 Thread Martin Michlmayr
Author: tbm
Date: Tue Mar 18 17:59:51 2008
New Revision: 10920

Log:
Rename the orion flavour in order to follow upstream


Added:
   dists/trunk/linux-2.6/debian/config/arm/config.orion5x
  - copied unchanged from r10919, 
/dists/trunk/linux-2.6/debian/config/arm/config.orion
Removed:
   dists/trunk/linux-2.6/debian/config/arm/config.orion
Modified:
   dists/trunk/linux-2.6/debian/config/arm/defines
   dists/trunk/linux-2.6/debian/config/armel/defines

Modified: dists/trunk/linux-2.6/debian/config/arm/defines
==
--- dists/trunk/linux-2.6/debian/config/arm/defines (original)
+++ dists/trunk/linux-2.6/debian/config/arm/defines Tue Mar 18 17:59:51 2008
@@ -3,7 +3,7 @@
  footbridge
  iop32x
  ixp4xx
- orion
+ orion5x
 kernel-arch: arm
 
 [image]
@@ -25,9 +25,9 @@
 class: IXP4xx
 longclass: IXP4xx based (Linksys NSLU2, etc)
 
-[orion_base]
+[orion5x_base]
 class: Orion
-longclass: Orion based (QNAP TS-109/TS-209, etc)
+longclass: Orion 5181, 5182 and 5281 based (QNAP TS-109/TS-209, etc)
 
 [versatile_base]
 class: Versatile

Modified: dists/trunk/linux-2.6/debian/config/armel/defines
==
--- dists/trunk/linux-2.6/debian/config/armel/defines   (original)
+++ dists/trunk/linux-2.6/debian/config/armel/defines   Tue Mar 18 17:59:51 2008
@@ -2,7 +2,7 @@
 flavours:
  iop32x
  ixp4xx
- orion
+ orion5x
  versatile
 kernel-arch: arm
 
@@ -24,12 +24,12 @@
 [ixp4xx_image]
 configs: arm/config.ixp4xx
 
-[orion_base]
+[orion5x_base]
 class: Orion
-longclass: Orion based (QNAP TS-109/TS-209, etc)
+longclass: Orion 5181, 5182 and 5281 based (QNAP TS-109/TS-209, etc)
 
-[orion_image]
-configs: arm/config.orion
+[orion5x_image]
+configs: arm/config.orion5x
 
 [versatile_base]
 class: Versatile

___
Kernel-svn-changes mailing list
Kernel-svn-changes@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/kernel-svn-changes