]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
13 years agoocfs2:btrfs: aio-dio-loop changes broke setrlimit behavior [orabug 14207636]
Dave Kleikamp [Wed, 20 Jun 2012 21:05:59 +0000 (16:05 -0500)]
ocfs2:btrfs: aio-dio-loop changes broke setrlimit behavior [orabug 14207636]

The aio-dio changes for the loop device driver broke ocfs2 and btrfs's
handling of rlimit. generic_write_checks() adjusts the IO byte count to
account for the rlimit, but the updated count was not being reflected in
the iov_iter data structure.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
13 years agoloop: loop_thread needs to set the PF_LESS_THROTTLE flag
Dave Kleikamp [Tue, 24 Apr 2012 22:43:47 +0000 (17:43 -0500)]
loop: loop_thread needs to set the PF_LESS_THROTTLE flag

The underlying file system may call balance_dirty_pages. We don't want
it to throttle there since we may be in the process of writing dirty
pages. This patch addresses the problem in the same manner as a local
nfs mount, as nfsd does the same.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
13 years agoiov_iter: missing assignment of ii_bvec_ops.ii_shorten
Dave Kleikamp [Fri, 20 Apr 2012 15:45:22 +0000 (10:45 -0500)]
iov_iter: missing assignment of ii_bvec_ops.ii_shorten

This seems to have been an oversight when porting the patches. This
function should never be called, but it should be defined just in case.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
13 years agoSPEC: v2.6.39-200.0.15
Maxim Uvarov [Thu, 12 Apr 2012 23:24:36 +0000 (16:24 -0700)]
SPEC: v2.6.39-200.0.15

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoMerge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public into uek...
Maxim Uvarov [Thu, 12 Apr 2012 23:21:03 +0000 (16:21 -0700)]
Merge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public into uek-2.6.39-200

Orabug: 13916031

13 years agodirectio: account for extra page IOs for unaligned request
Dave Kleikamp [Thu, 12 Apr 2012 21:44:41 +0000 (16:44 -0500)]
directio: account for extra page IOs for unaligned request

sdio_init() initializes pages_in_io to 2 for an unaligned directio request
in order that a zero page may be written to the first and last block.
However, __blockdev_direct_IO_bvec was setting pages_in_io to the number
of pages in the request rather than adding them to the original value.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
13 years agoSPEC: v2.6.39-200.0.14
Maxim Uvarov [Sat, 7 Apr 2012 00:08:37 +0000 (17:08 -0700)]
SPEC: v2.6.39-200.0.14

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoupdate kabi
Maxim Uvarov [Sat, 7 Apr 2012 00:04:55 +0000 (17:04 -0700)]
update kabi

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoadjust kernel configs
Maxim Uvarov [Thu, 5 Apr 2012 22:42:09 +0000 (15:42 -0700)]
adjust kernel configs

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoMerge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public
Maxim Uvarov [Thu, 5 Apr 2012 21:36:39 +0000 (14:36 -0700)]
Merge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public

13 years agousb: fix number of mapped SG DMA entries
Clemens Ladisch [Sat, 3 Dec 2011 22:41:31 +0000 (23:41 +0100)]
usb: fix number of mapped SG DMA entries

commit bc677d5b64644c399cd3db6a905453e611f402ab upstream.

Add a new field num_mapped_sgs to struct urb so that we have a place to
store the number of mapped entries and can also retain the original
value of entries in num_sgs.  Previously, usb_hcd_map_urb_for_dma()
would overwrite this with the number of mapped entries, which would
break dma_unmap_sg() because it requires the original number of entries.

This fixes warnings like the following when using USB storage devices:
 ------------[ cut here ]------------
 WARNING: at lib/dma-debug.c:902 check_unmap+0x4e4/0x695()
 ehci_hcd 0000:00:12.2: DMA-API: device driver frees DMA sg list with different entry count [map count=4] [unmap count=1]
 Modules linked in: ohci_hcd ehci_hcd
 Pid: 0, comm: kworker/0:1 Not tainted 3.2.0-rc2+ #319
 Call Trace:
  <IRQ>  [<ffffffff81036d3b>] warn_slowpath_common+0x80/0x98
  [<ffffffff81036de7>] warn_slowpath_fmt+0x41/0x43
  [<ffffffff811fa5ae>] check_unmap+0x4e4/0x695
  [<ffffffff8105e92c>] ? trace_hardirqs_off+0xd/0xf
  [<ffffffff8147208b>] ? _raw_spin_unlock_irqrestore+0x33/0x50
  [<ffffffff811fa84a>] debug_dma_unmap_sg+0xeb/0x117
  [<ffffffff8137b02f>] usb_hcd_unmap_urb_for_dma+0x71/0x188
  [<ffffffff8137b166>] unmap_urb_for_dma+0x20/0x22
  [<ffffffff8137b1c5>] usb_hcd_giveback_urb+0x5d/0xc0
  [<ffffffffa0000d02>] ehci_urb_done+0xf7/0x10c [ehci_hcd]
  [<ffffffffa0001140>] qh_completions+0x429/0x4bd [ehci_hcd]
  [<ffffffffa000340a>] ehci_work+0x95/0x9c0 [ehci_hcd]
  ...
 ---[ end trace f29ac88a5a48c580 ]---
 Mapped at:
  [<ffffffff811faac4>] debug_dma_map_sg+0x45/0x139
  [<ffffffff8137bc0b>] usb_hcd_map_urb_for_dma+0x22e/0x478
  [<ffffffff8137c494>] usb_hcd_submit_urb+0x63f/0x6fa
  [<ffffffff8137d01c>] usb_submit_urb+0x2c7/0x2de
  [<ffffffff8137dcd4>] usb_sg_wait+0x55/0x161

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agosvcrpc: destroy server sockets all at once
J. Bruce Fields [Tue, 29 Nov 2011 16:35:35 +0000 (11:35 -0500)]
svcrpc: destroy server sockets all at once

commit 2fefb8a09e7ed251ae8996e0c69066e74c5aa560 upstream.

There's no reason I can see that we need to call sv_shutdown between
closing the two lists of sockets.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoPCI: Rework ASPM disable code
Matthew Garrett [Thu, 10 Nov 2011 21:38:33 +0000 (16:38 -0500)]
PCI: Rework ASPM disable code

commit 3c076351c4027a56d5005a39a0b518a4ba393ce2 upstream.

Right now we forcibly clear ASPM state on all devices if the BIOS indicates
that the feature isn't supported. Based on the Microsoft presentation
"PCI Express In Depth for Windows Vista and Beyond", I'm starting to think
that this may be an error. The implication is that unless the platform
grants full control via _OSC, Windows will not touch any PCIe features -
including ASPM. In that case clearing ASPM state would be an error unless
the platform has granted us that control.

This patch reworks the ASPM disabling code such that the actual clearing
of state is triggered by a successful handoff of PCIe control to the OS.
The general ASPM code undergoes some changes in order to ensure that the
ability to clear the bits isn't overridden by ASPM having already been
disabled. Further, this theoretically now allows for situations where
only a subset of PCIe roots hand over control, leaving the others in the
BIOS state.

It's difficult to know for sure that this is the right thing to do -
there's zero public documentation on the interaction between all of these
components. But enough vendors enable ASPM on platforms and then set this
bit that it seems likely that they're expecting the OS to leave them alone.

Measured to save around 5W on an idle Thinkpad X220.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agonet: fix NULL dereferences in check_peer_redir()
Eric Dumazet [Thu, 9 Feb 2012 21:13:19 +0000 (16:13 -0500)]
net: fix NULL dereferences in check_peer_redir()

[ Upstream commit d3aaeb38c40e5a6c08dd31a1b64da65c4352be36, along
  with dependent backports of commits:
     69cce1d1404968f78b177a0314f5822d5afdbbfb
     9de79c127cccecb11ae6a21ab1499e87aa222880
     218fa90f072e4aeff9003d57e390857f4f35513e
     580da35a31f91a594f3090b7a2c39b85cb051a12
     f7e57044eeb1841847c24aa06766c8290c202583
     e049f28883126c689cf95859480d9ee4ab23b7fa ]

Gergely Kalman reported crashes in check_peer_redir().

It appears commit f39925dbde778 (ipv4: Cache learned redirect
information in inetpeer.) added a race, leading to possible NULL ptr
dereference.

Since we can now change dst neighbour, we should make sure a reader can
safely use a neighbour.

Add RCU protection to dst neighbour, and make sure check_peer_redir()
can be called safely by different cpus in parallel.

As neighbours are already freed after one RCU grace period, this patch
should not add typical RCU penalty (cache cold effects)

Many thanks to Gergely for providing a pretty report pointing to the
bug.

Reported-by: Gergely Kalman <synapse@hippy.csoma.elte.hu>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agolib: proportion: lower PROP_MAX_SHIFT to 32 on 64-bit kernel
Wu Fengguang [Mon, 9 Jan 2012 17:53:50 +0000 (11:53 -0600)]
lib: proportion: lower PROP_MAX_SHIFT to 32 on 64-bit kernel

commit 3310225dfc71a35a2cc9340c15c0e08b14b3c754 upstream.

PROP_MAX_SHIFT should be set to <=32 on 64-bit box. This fixes two bugs
in the below lines of bdi_dirty_limit():

bdi_dirty *= numerator;
do_div(bdi_dirty, denominator);

1) divide error: do_div() only uses the lower 32 bit of the denominator,
   which may trimmed to be 0 when PROP_MAX_SHIFT > 32.

2) overflow: (bdi_dirty * numerator) could easily overflow if numerator
   used up to 48 bits, leaving only 16 bits to bdi_dirty

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reported-by: Ilya Tumaykin <librarian_rus@yahoo.com>
Tested-by: Ilya Tumaykin <librarian_rus@yahoo.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agowriteback: fix dereferencing NULL bdi->dev on trace_writeback_queue
Wu Fengguang [Sun, 5 Feb 2012 02:54:03 +0000 (20:54 -0600)]
writeback: fix dereferencing NULL bdi->dev on trace_writeback_queue

commit 977b7e3a52a7421ad33a393a38ece59f3d41c2fa upstream.

When a SD card is hot removed without umount, del_gendisk() will call
bdi_unregister() without destroying/freeing it. This leaves the bdi in
the bdi->dev = NULL, bdi->wb.task = NULL, bdi->bdi_list removed state.

When sync(2) gets the bdi before bdi_unregister() and calls
bdi_queue_work() after the unregister, trace_writeback_queue will be
dereferencing the NULL bdi->dev. Fix it with a simple test for NULL.

LKML-reference: http://lkml.org/lkml/2012/1/18/346
Reported-by: Rabin Vincent <rabin@rab.in>
Tested-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agonet: Make qdisc_skb_cb upper size bound explicit.
David S. Miller [Mon, 6 Feb 2012 20:14:37 +0000 (15:14 -0500)]
net: Make qdisc_skb_cb upper size bound explicit.

[ Upstream commit 16bda13d90c8d5da243e2cfa1677e62ecce26860 ]

Just like skb->cb[], so that qdisc_skb_cb can be encapsulated inside
of other data structures.

This is intended to be used by IPoIB so that it can remember
addressing information stored at hard_header_ops->create() time that
it can fetch when the packet gets to the transmit routine.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agoipv4: Save nexthop address of LSRR/SSRR option to IPCB.
Maxim Uvarov [Wed, 4 Apr 2012 21:38:26 +0000 (14:38 -0700)]
ipv4: Save nexthop address of LSRR/SSRR option to IPCB.

[ Upstream commit ac8a48106be49c422575ddc7531b776f8eb49610 ]

We can not update iph->daddr in ip_options_rcv_srr(), It is too early.
When some exception ocurred later (eg. in ip_forward() when goto
sr_failed) we need the ip header be identical to the original one as
ICMP need it.

Add a field 'nexthop' in struct ip_options to save nexthop of LSRR
or SSRR option.

Signed-off-by: Li Wei <lw@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Conflicts:

net/ipv4/ip_options.c

13 years agocompat: use sys_sendfile64() implementation for sendfile syscall
Chris Metcalf [Mon, 26 Mar 2012 20:26:12 +0000 (16:26 -0400)]
compat: use sys_sendfile64() implementation for sendfile syscall

commit 1631fcea8399da5e80a80084b3b8c5bfd99d21e7 upstream.

<asm-generic/unistd.h> was set up to use sys_sendfile() for the 32-bit
compat API instead of sys_sendfile64(), but in fact the right thing to
do is to use sys_sendfile64() in all cases.  The 32-bit sendfile64() API
in glibc uses the sendfile64 syscall, so it has to be capable of doing
full 64-bit operations.  But the sys_sendfile() kernel implementation
has a MAX_NON_LFS test in it which explicitly limits the offset to 2^32.
So, we need to use the sys_sendfile64() implementation in the kernel
for this case.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agoext4: implement ext4_file_write_iter
Dave Kleikamp [Tue, 3 Apr 2012 03:53:49 +0000 (22:53 -0500)]
ext4: implement ext4_file_write_iter

It was a mistake to have ext4 use generic_file_write_iter(). Its
write_iter function needs to act like ext4_file_write()

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
13 years agoSPEC: v2.6.39-200.0.13
Maxim Uvarov [Tue, 3 Apr 2012 00:30:53 +0000 (17:30 -0700)]
SPEC: v2.6.39-200.0.13

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agofix git merge: vlan: allow nested vlan_do_receive()
Maxim Uvarov [Tue, 3 Apr 2012 00:16:37 +0000 (17:16 -0700)]
fix git merge: vlan: allow nested vlan_do_receive()

Git commit was not cleanly cherry-picked but this changes
are under ifdef so build did not fail on that. Fix it now.
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoSPEC: update and turn on kabi
Maxim Uvarov [Mon, 2 Apr 2012 22:33:36 +0000 (15:33 -0700)]
SPEC: update and turn on kabi

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoSPEC: v2.6.39-200.0.12
Maxim Uvarov [Mon, 2 Apr 2012 17:55:35 +0000 (10:55 -0700)]
SPEC: v2.6.39-200.0.12

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoremove unused mutex hpidebuglock
Maxim Uvarov [Tue, 27 Mar 2012 23:44:21 +0000 (16:44 -0700)]
remove unused mutex hpidebuglock

Remove unused mutex and clean up following warnings
drivers/net/hxge/hpi/hpi.c:35: warning: data definition has no type or storage class
drivers/net/hxge/hpi/hpi.c:35: warning: type defaults to "int" in declaration of "DECLARE_MUTEX"
drivers/net/hxge/hpi/hpi.c:35: warning: parameter names (without types) in function declaration

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoadd hxge-1.3.3 driver
Maxim Uvarov [Tue, 27 Mar 2012 22:07:54 +0000 (15:07 -0700)]
add hxge-1.3.3 driver

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoSPEC: v2.6.39-200.0.11
Maxim Uvarov [Sat, 31 Mar 2012 00:19:38 +0000 (17:19 -0700)]
SPEC: v2.6.39-200.0.11

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agovlan: allow nested vlan_do_receive()
Maxim Uvarov [Fri, 30 Mar 2012 23:52:48 +0000 (16:52 -0700)]
vlan: allow nested vlan_do_receive()

commit 2425717b27eb (net: allow vlan traffic to be received under bond)
broke ARP processing on vlan on top of bonding.

       +-------+
eth0 --| bond0 |---bond0.103
eth1 --|       |
       +-------+

52870.115435: skb_gro_reset_offset <-napi_gro_receive
52870.115435: dev_gro_receive <-napi_gro_receive
52870.115435: napi_skb_finish <-napi_gro_receive
52870.115435: netif_receive_skb <-napi_skb_finish
52870.115435: get_rps_cpu <-netif_receive_skb
52870.115435: __netif_receive_skb <-netif_receive_skb
52870.115436: vlan_do_receive <-__netif_receive_skb
52870.115436: bond_handle_frame <-__netif_receive_skb
52870.115436: vlan_do_receive <-__netif_receive_skb
52870.115436: arp_rcv <-__netif_receive_skb
52870.115436: kfree_skb <-arp_rcv

Packet is dropped in arp_rcv() because its pkt_type was set to
PACKET_OTHERHOST in the first vlan_do_receive() call, since no eth0.103
exists.

We really need to change pkt_type only if no more rx_handler is about to
be called for the packet.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Conflicts:

include/linux/if_vlan.h

13 years agonet: allow vlan traffic to be received under bond
John Fastabend [Mon, 10 Oct 2011 09:16:41 +0000 (09:16 +0000)]
net: allow vlan traffic to be received under bond

The following configuration used to work as I expected. At least
we could use the fcoe interfaces to do MPIO and the bond0 iface
to do load balancing or failover.

       ---eth2.228-fcoe
       |
eth2 -----|
          |
          |---- bond0
          |
eth3 -----|
       |
       ---eth3.228-fcoe

This worked because of a change we added to allow inactive slaves
to rx 'exact' matches. This functionality was kept intact with the
rx_handler mechanism. However now the vlan interface attached to the
active slave never receives traffic because the bonding rx_handler
updates the skb->dev and goto's another_round. Previously, the
vlan_do_receive() logic was called before the bonding rx_handler.

Now by the time vlan_do_receive calls vlan_find_dev() the
skb->dev is set to bond0 and it is clear no vlan is attached
to this iface. The vlan lookup fails.

This patch moves the VLAN check above the rx_handler. A VLAN
tagged frame is now routed to the eth2.228-fcoe iface in the
above schematic. Untagged frames continue to the bond0 as
normal. This case also remains intact,

eth2 --> bond0 --> vlan.228

Here the skb is VLAN tagged but the vlan lookup fails on eth2
causing the bonding rx_handler to be called. On the second
pass the vlan lookup is on the bond0 iface and completes as
expected.

Putting a VLAN.228 on both the bond0 and eth2 device will
result in eth2.228 receiving the skb. I don't think this is
completely unexpected and was the result prior to the rx_handler
result.

Note, the same setup is also used for other storage traffic that
MPIO is used with eg. iSCSI and similar setups can be contrived
without storage protocols.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Tested-by: Hans Schillstrom <hams.schillstrom@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: vlan: goto another_round instead of calling __netif_receive_skb
Jiri Pirko [Mon, 22 Aug 2011 19:43:22 +0000 (12:43 -0700)]
net: vlan: goto another_round instead of calling __netif_receive_skb

Now, when vlan tag on untagged in non-accelerated path is stripped from
skb, headers are reset right away. Benefit from that and avoid calling
__netif_receive_skb recursivelly and just use another_round.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoSPEC: v2.6.39-200.0.10
Maxim Uvarov [Thu, 29 Mar 2012 21:43:24 +0000 (14:43 -0700)]
SPEC: v2.6.39-200.0.10

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoocfs2/cluster: Fix output in file elapsed_time_in_ms
Sunil Mushran [Wed, 22 Jun 2011 23:56:14 +0000 (16:56 -0700)]
ocfs2/cluster: Fix output in file elapsed_time_in_ms

The o2hb debugfs file, elapsed_time_in_ms, should return values only after the
timer is armed for the time time.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
13 years agoSPEC: v2.6.39-200.0.9
Maxim Uvarov [Thu, 29 Mar 2012 19:52:38 +0000 (12:52 -0700)]
SPEC: v2.6.39-200.0.9

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoRevert "loop: increase default number of loop devices to 512"
Maxim Uvarov [Thu, 29 Mar 2012 19:11:24 +0000 (12:11 -0700)]
Revert "loop: increase default number of loop devices to 512"

This reverts commit 216aace2f31f28c54b612b032e76ee827396fb55.
Bug was fixed in agent side, reverting this patch.

13 years agoRevert "loop: set default number of loop devices to 200"
Maxim Uvarov [Thu, 29 Mar 2012 19:10:06 +0000 (12:10 -0700)]
Revert "loop: set default number of loop devices to 200"

This reverts commit 10fa61b8a250525b8ca79e0f5edde054a97caf44.
Bug was fixed in agent side, reverting this patch.

13 years agoocfs2/dlm: dlmlock_remote() needs to account for remastery
Sunil Mushran [Tue, 21 Jun 2011 20:22:42 +0000 (13:22 -0700)]
ocfs2/dlm: dlmlock_remote() needs to account for remastery

In dlmlock_remote(), we wait for the resource to stop being active before
setting the inprogress flag. Active includes recovery, migration, etc.

The problem here is that if the resource was being recovered or migrated, the
new owner could very well be that node itself (and thus not a remote node).
This problem was observed in Oracle bug#12583620. The error messages observed
were as follows:

dlm_send_remote_lock_request:337 ERROR: Error -40 (ELOOP) when sending message 503 (key 0xd6d8c7) to node 2
dlmlock_remote:271 ERROR: dlm status = DLM_BADARGS
dlmlock:751 ERROR: dlm status = DLM_BADARGS

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
13 years agoocfs2/dlm: Take inflight reference count for remotely mastered resources too
Maxim Uvarov [Thu, 29 Mar 2012 18:31:22 +0000 (11:31 -0700)]
ocfs2/dlm: Take inflight reference count for remotely mastered resources too

The inflight reference count, in the lock resource, is taken to pin the resource
in memory. We take it when a new resource is created and release it after a
lock is attached to it. We do this to prevent the resource from getting purged
prematurely.

Earlier this reference count was being taken for locally mastered resources
only. This patch extends the same functionality for remotely mastered ones.

We are doing this because the same premature purging could occur for remotely
mastered resources if the remote node were to die before completion of the
create lock.

Fix for Oracle bug#12405575.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Conflicts:

fs/ocfs2/dlm/dlmmaster.c

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoocfs2/dlm: Clean up refmap helpers
Maxim Uvarov [Thu, 29 Mar 2012 18:28:31 +0000 (11:28 -0700)]
ocfs2/dlm: Clean up refmap helpers

Patch cleans up helpers that set/clear refmap bits and grab/drop inflight lock
ref counts.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Conflicts:

fs/ocfs2/dlm/dlmmaster.c

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoocfs2/dlm: Cleanup dlm_wait_for_node_death() and dlm_wait_for_node_recovery()
Sunil Mushran [Tue, 21 Jun 2011 20:22:40 +0000 (13:22 -0700)]
ocfs2/dlm: Cleanup dlm_wait_for_node_death() and dlm_wait_for_node_recovery()

dlm_wait_for_node_death() and dlm_wait_for_node_recovery() needed a facelift.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
13 years agoocfs2/dlm: Cleanup up dlm_finish_local_lockres_recovery()
Sunil Mushran [Tue, 21 Jun 2011 20:22:37 +0000 (13:22 -0700)]
ocfs2/dlm: Cleanup up dlm_finish_local_lockres_recovery()

dlm_finish_local_lockres_recovery() needed a facelift.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
13 years agoocfs2/dlm: Trace insert/remove of resource to/from hash
Sunil Mushran [Tue, 21 Jun 2011 20:22:39 +0000 (13:22 -0700)]
ocfs2/dlm: Trace insert/remove of resource to/from hash

Add mlog to trace adding and removing the resource from/to the hash table.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
13 years agoocfs2/dlm: Clean up messages in o2dlm
Sunil Mushran [Tue, 21 Jun 2011 20:22:35 +0000 (13:22 -0700)]
ocfs2/dlm: Clean up messages in o2dlm

o2dlm messages needed a facelift.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
13 years agoocfs2/cluster: Cluster up now includes network connections too
Sunil Mushran [Wed, 22 Jun 2011 23:56:27 +0000 (16:56 -0700)]
ocfs2/cluster: Cluster up now includes network connections too

The cluster up check only checks to see if the node is heartbeating or not.
If yes it continues assuming that the node is connected to all the nodes. But
if that is not the case, the cluster join aborts with a stack of errors that
are not easy to comprehend.

This patch adds the network connect check upfront and prints the nodes that
the node is not yet connected to, before aborting.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
13 years agoocfs2/cluster: Clean up messages in o2net
Sunil Mushran [Tue, 21 Jun 2011 20:21:28 +0000 (13:21 -0700)]
ocfs2/cluster: Clean up messages in o2net

o2net messages needed a facelift.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
13 years agoocfs2/cluster: Abort heartbeat start on hard-ro devices
Sunil Mushran [Mon, 20 Jun 2011 17:07:08 +0000 (10:07 -0700)]
ocfs2/cluster: Abort heartbeat start on hard-ro devices

Currently if the heartbeat device is hard-ro, the o2hb thread keeps chugging
along and dumping errors along the way. The user needs to manually stop the
heartbeat.

The patch addresses this shortcoming by adding a limit to the number of times
the hb thread will iterate in an unsteady state. If the hb thread does not
ready steady state in that many interation, the start is aborted.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
13 years agoSPEC: v2.6.39-200.0.8
Maxim Uvarov [Tue, 27 Mar 2012 22:26:25 +0000 (15:26 -0700)]
SPEC: v2.6.39-200.0.8

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoloop: set default number of loop devices to 200
Maxim Uvarov [Tue, 27 Mar 2012 22:22:13 +0000 (15:22 -0700)]
loop: set default number of loop devices to 200

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoSPEC OL5: fix xen support
Maxim Uvarov [Mon, 26 Mar 2012 23:05:33 +0000 (16:05 -0700)]
SPEC OL5: fix xen support

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoSPEC: v2.6.39-200.0.6
Maxim Uvarov [Fri, 23 Mar 2012 01:59:19 +0000 (18:59 -0700)]
SPEC: v2.6.39-200.0.6

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoocfs2: Rollback commit ea455f8ab68338ba69f5d3362b342c115bea8e13
Sunil Mushran [Fri, 23 Mar 2012 01:44:51 +0000 (18:44 -0700)]
ocfs2: Rollback commit ea455f8ab68338ba69f5d3362b342c115bea8e13

This patch is part 3 of 3 patches that rolls back changes that appear
to have broken delete.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Conflicts:

fs/ocfs2/dcache.c

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoocfs2: Rollback commit f7b1aa69be138ad9d7d3f31fa56f4c9407f56b6a
Sunil Mushran [Fri, 23 Mar 2012 01:43:54 +0000 (18:43 -0700)]
ocfs2: Rollback commit f7b1aa69be138ad9d7d3f31fa56f4c9407f56b6a

This patch is part 2 of 3 patches that rolls back changes that appear
to have broken delete.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Conflicts:

fs/ocfs2/super.c

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoocfs2: Rollback commit 5fd131893793567c361ae64cbeb28a2a753bbe35
Sunil Mushran [Tue, 29 Nov 2011 20:55:54 +0000 (12:55 -0800)]
ocfs2: Rollback commit 5fd131893793567c361ae64cbeb28a2a753bbe35

This patch is part 1 of 3 patches that rolls back changes that appear
to have broken delete. Those patches were originally added to fix a deadlock
with quotas enabled. Considering we are not enabling quotas in OVM3, it is
ok to rollback these patches. We will have to solve the deadlock in another
way.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
13 years agoocfs2/cluster: Fix o2net_fill_node_map()
Sunil Mushran [Wed, 23 Nov 2011 18:50:23 +0000 (10:50 -0800)]
ocfs2/cluster: Fix o2net_fill_node_map()

Fix an oops having the following stack trace....
o2net_fill_node_map() => o2net_tx_can_proceed() => sc_put() => kref_put() => sc_kref_release()

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
13 years agoocfs2/cluster: Add new function o2net_fill_node_map()
Sunil Mushran [Wed, 22 Jun 2011 23:56:20 +0000 (16:56 -0700)]
ocfs2/cluster: Add new function o2net_fill_node_map()

Patch adds function o2net_fill_node_map() to return the bitmap of nodes that
it is connected to. This bitmap is also accessible by the user via the debugfs
file, /sys/kernel/debug/o2net/connected_nodes.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
13 years agoocfs2: Tighten free bit calculation in the global bitmap
Sunil Mushran [Tue, 8 Nov 2011 21:00:19 +0000 (13:00 -0800)]
ocfs2: Tighten free bit calculation in the global bitmap

When clearing bits in the global bitmap, we do not test the current bit value.
This patch tightens the code by considering the possiblity that the bit being
cleared was already cleared.

Now this should not happen. But we are seeing stray instances in which free
bit count in the global bitmap exceeds the total bit count. In each instance
the bitmap is correct. Only the free bit count is incorrect.

This patch checks the current bit value and increments the free bit count
only if the bit was previously set. It also prints information to allow
us to debug further.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
13 years agoocfs2/trivial: Limit unaligned aio+dio write messages to once per day
Sunil Mushran [Wed, 7 Sep 2011 18:39:30 +0000 (11:39 -0700)]
ocfs2/trivial: Limit unaligned aio+dio write messages to once per day

It was printing more frequently.

Signed-off-cy: Sunil Mushran <sunil.mushran@oracle.com>

13 years agoMerge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public into uek2-200
Maxim Uvarov [Fri, 23 Mar 2012 01:38:26 +0000 (18:38 -0700)]
Merge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public into uek2-200

13 years agobtrfs: btrfs_direct_IO_bvec() needs to check for sector alignment
Dave Kleikamp [Thu, 22 Mar 2012 22:19:44 +0000 (17:19 -0500)]
btrfs: btrfs_direct_IO_bvec() needs to check for sector alignment

I left out a vital piece of btrfs_direct_IO_bvec(). I didn't think
check_direct_IO() was needed, but it is. This patch creates its
equivalent, check_direct_IO_bvec().

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
13 years agoMerge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public into buek2-200
Maxim Uvarov [Thu, 22 Mar 2012 17:36:09 +0000 (10:36 -0700)]
Merge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public into buek2-200

13 years agoMerge branch 'uek2-merge' of git://ca-git.us.oracle.com/linux-konrad-public into...
Maxim Uvarov [Thu, 22 Mar 2012 17:35:15 +0000 (10:35 -0700)]
Merge branch 'uek2-merge' of git://ca-git.us.oracle.com/linux-konrad-public into buek2-200

13 years agoloop: increase default number of loop devices to 512
Dave Kleikamp [Thu, 22 Mar 2012 16:58:15 +0000 (11:58 -0500)]
loop: increase default number of loop devices to 512

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
13 years agoxen/merge error: Re-introduce xen-platform-pci driver.
Konrad Rzeszutek Wilk [Thu, 22 Mar 2012 14:23:34 +0000 (10:23 -0400)]
xen/merge error: Re-introduce xen-platform-pci driver.

The merge 98687483f3918349f96697261b491ee41b824871:

    Merge branch 'stable/not-upstreamed' into uek2-merge

    * stable/not-upstreamed:
      Xen: Export host physical CPU information to dom0
      xen/mce: Change the machine check point
      Add mcelog support from xen platform

    Conflicts:
     drivers/xen/Kconfig
     drivers/xen/Makefile

mismerged the Makefile. The end result that the line
obj-$(CONFIG_XEN_PVHVM) += platform_pci.o was removed
leading to no PVonHVM driver to tell QEMU to unplug the device.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agox86/PCI: reduce severity of host bridge window conflict warnings
Bjorn Helgaas [Sat, 2 Jul 2011 16:47:12 +0000 (10:47 -0600)]
x86/PCI: reduce severity of host bridge window conflict warnings

Host bridge windows are top-level resources, so if we find a host bridge
window conflict, it's probably with a hard-coded legacy reservation.
Moving host bridge windows is theoretically possible, but we don't support
it; we just ignore windows with conflicts, and it's not worth making this
a user-visible error.

Reported-and-tested-by: Jools Wills <jools@oxfordinspire.co.uk>
References: https://bugzilla.kernel.org/show_bug.cgi?id=38522
Reported-by: Das <dasfox@gmail.com>
References: https://bugzilla.kernel.org/show_bug.cgi?id=16497
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Fixes Oracle Bug 13818972
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoSPEC: v2.6.39-200.0.5
Maxim Uvarov [Thu, 22 Mar 2012 00:34:38 +0000 (17:34 -0700)]
SPEC: v2.6.39-200.0.5

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoMerge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public into buek2-200
Maxim Uvarov [Thu, 22 Mar 2012 00:31:57 +0000 (17:31 -0700)]
Merge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public into buek2-200

13 years agoSPEC: v2.6.39-200.0.4
Maxim Uvarov [Thu, 22 Mar 2012 00:23:10 +0000 (17:23 -0700)]
SPEC: v2.6.39-200.0.4

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoocfs2/trivial: Print message indicating unaligned aio+dio write
Sunil Mushran [Mon, 15 Aug 2011 20:49:11 +0000 (13:49 -0700)]
ocfs2/trivial: Print message indicating unaligned aio+dio write

Print a message indicating unaligned aio+dio writes. It prints a message
once per 24 hrs.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
13 years agoocfs2: Avoid livelock in ocfs2_readpage()
Jan Kara [Mon, 15 Aug 2011 17:09:33 +0000 (10:09 -0700)]
ocfs2: Avoid livelock in ocfs2_readpage()

[Pulled before push to mainline]

When someone writes to an inode, readers accessing the same inode via
ocfs2_readpage() just busyloop trying to get ip_alloc_sem because
do_generic_file_read() looks up the page again and retries ->readpage()
when previous attempt failed with AOP_TRUNCATED_PAGE. When there are enough
readers, they can occupy all CPUs and in non-preempt kernel the system is
deadlocked because writer holding ip_alloc_sem is never run to release the
semaphore. Fix the problem by making reader block on ip_alloc_sem to break
the busy loop.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
13 years agoocfs2: serialize unaligned aio
Mark Fasheh [Mon, 15 Aug 2011 17:08:44 +0000 (10:08 -0700)]
ocfs2: serialize unaligned aio

[Pulled before push to mainline]

Fix a corruption that can happen when we have (two or more) outstanding
aio's to an overlapping unaligned region.  Ext4
(e9e3bcecf44c04b9e6b505fd8e2eb9cea58fb94d) and xfs recently had to fix
similar issues.

In our case what happens is that we can have an outstanding aio on a region
and if a write comes in with some bytes overlapping the original aio we may
decide to read that region into a page before continuing (typically because
of buffered-io fallback).  Since we have no ordering guarantees with the
aio, we can read stale or bad data into the page and then write it back out.

If the i/o is page and block aligned, then we avoid this issue as there
won't be any need to read data from disk.

I took the same approach as Eric in the ext4 patch and introduced some
serialization of unaligned async direct i/o.  I don't expect this to have an
effect on the most common cases of AIO.  Unaligned aio will be slower
though, but that's far more acceptable than data corruption.

Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
13 years agoocfs2: null deref on allocation error
Dan Carpenter [Mon, 15 Aug 2011 16:55:36 +0000 (09:55 -0700)]
ocfs2: null deref on allocation error

[Pulled before push to mainline]

The original code had a null derefence in the error handling.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
13 years agoocfs2: Bugfix for hard readonly mount
Tiger Yang [Mon, 15 Aug 2011 16:54:55 +0000 (09:54 -0700)]
ocfs2: Bugfix for hard readonly mount

[Pulled before push to mainline]

ocfs2 cannot currently mount a device that is readonly at the media
("hard readonly").  Fix the broken places.
see detail: http://oss.oracle.com/bugzilla/show_bug.cgi?id=1322

[ Description edited -- Joel ]

Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Reviewed-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
13 years agobtrfs: create btrfs_file_write_iter()
Dave Kleikamp [Wed, 21 Mar 2012 20:06:42 +0000 (15:06 -0500)]
btrfs: create btrfs_file_write_iter()

Since btrfs has it's own aio_write function, it needs a similar
write_iter. This patch patterns btrfs_file_write_iter on
btrfs_file_aio_write, then has the latter call the former.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
13 years agoxen/acpi: Remove the WARN's as they just create noise.
Konrad Rzeszutek Wilk [Wed, 21 Mar 2012 15:43:32 +0000 (11:43 -0400)]
xen/acpi: Remove the WARN's as they just create noise.

When booting the kernel under machines that do not have P-states
we would end up with:

------------[ cut here ]------------
 WARNING: at drivers/xen/xen-acpi-processor.c:504
 xen_acpi_processor_init+0x286/0
 x2e0()
 Hardware name: ProLiant BL460c G6
 Modules linked in:
 Pid: 1, comm: swapper Not tainted 2.6.39-200.0.3.el5uek #1
 Call Trace:
  [<ffffffff8191d056>] ? xen_acpi_processor_init+0x286/0x2e0
  [<ffffffff81068300>] warn_slowpath_common+0x90/0xc0
  [<ffffffff8191cdd0>] ? check_acpi_ids+0x1e0/0x1e0
  [<ffffffff8106834a>] warn_slowpath_null+0x1a/0x20
  [<ffffffff8191d056>] xen_acpi_processor_init+0x286/0x2e0
  [<ffffffff8191cdd0>] ? check_acpi_ids+0x1e0/0x1e0
  [<ffffffff81002168>] do_one_initcall+0xe8/0x130

.. snip..

Which is OK - the machines do not have P-states, so we fail to register
to process the _PXX states. But there is no need to WARN the user
of it.

Oracle BZ# 13871288
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoSPEC: v2.6.39-200.0.3
Guru Anbalagane [Tue, 20 Mar 2012 00:52:16 +0000 (17:52 -0700)]
SPEC: v2.6.39-200.0.3
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoMerge branch 'uek2-merge' of git://ca-git.us.oracle.com/linux-konrad-public into...
Guru Anbalagane [Tue, 20 Mar 2012 00:43:53 +0000 (17:43 -0700)]
Merge branch 'uek2-merge' of git://ca-git.us.oracle.com/linux-konrad-public into uek2-200

13 years agoSPEC: v2.6.39-200.0.2
Guru Anbalagane [Thu, 15 Mar 2012 00:46:04 +0000 (17:46 -0700)]
SPEC: v2.6.39-200.0.2

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoxen: make page table walk hugepages aware
Dave McCracken [Thu, 15 Mar 2012 00:37:45 +0000 (17:37 -0700)]
xen: make page table walk hugepages aware

Orabug: 13719997
Fix problem in Xen pvhugepages where page table walk to lock/unlock
page table pages needed to be taught about hugepages.

Signed-off-by: Dave McCracken <dave.mccracken@oracle.com>
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agox86/PCI: Preserve existing pci=bfsort whitelist for Dell systems
Narendra_K@Dell.com [Fri, 18 Mar 2011 17:22:14 +0000 (10:22 -0700)]
x86/PCI: Preserve existing pci=bfsort whitelist for Dell systems

Commit 6e8af08dfa40b747002207d3ce8e8b43a050d99f enables pci=bfsort on
future Dell systems. But the identification string 'Dell System' matches
on already existing whitelist, which do not have SMBIOS type 0xB1,
causing pci=bfsort not being set on existing whitelist.

This patch fixes the regression by moving the type 0xB1 check beyond the
existing whitelist so that existing whitelist is walked before.

Signed-off-by: Shyam Iyer <shyam_iyer@dell.com>
Signed-off-by: Narendra K <narendra_k@dell.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 years agoxen/blkback: Disable DISCARD support for loopback device (but leave for phy).
Konrad Rzeszutek Wilk [Tue, 13 Mar 2012 22:05:58 +0000 (18:05 -0400)]
xen/blkback: Disable DISCARD support for loopback device (but leave for phy).

Until we back-port the changes from 3.3 which alter the loopback device
to support the full gamma of discard attributes. Otherwise we have to
punch through loop device to retrieve the underlaying disk size and
do other nasty things to get the proper information.

Also there is the outstanding issue that Logical Volumes won't pass
through the DISCARD support, so in most cases we can't take advantage of
this code until that gets fixed.

Fixes Oracle BZ#13779884
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoblock: fix patch import error in max_discard_sectors check
Jens Axboe [Sat, 23 Jul 2011 18:34:59 +0000 (20:34 +0200)]
block: fix patch import error in max_discard_sectors check

A '!' snuck in before the unlikely, rendering it useless.

Reported-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
[Fixes BZ#13779884]
Signed-off-b: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

13 years agoblock: eliminate potential for infinite loop in blkdev_issue_discard
Mike Snitzer [Wed, 6 Jul 2011 19:30:50 +0000 (21:30 +0200)]
block: eliminate potential for infinite loop in blkdev_issue_discard

Due to the recently identified overflow in read_capacity_16() it was
possible for max_discard_sectors to be zero but still have discards
enabled on the associated device's queue.

Eliminate the possibility for blkdev_issue_discard to infinitely loop.

Interestingly this issue wasn't identified until a device, whose
discard_granularity was 0 due to read_capacity_16 overflow, was consumed
by blk_stack_limits() to construct limits for a higher-level DM
multipath device.  The multipath device's resulting limits never had the
discard limits stacked because blk_stack_limits() will only do so if
the bottom device's discard_granularity != 0.  This resulted in the
multipath device's limits.max_discard_sectors being 0.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
[Fixes Oracle BZ13779884]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk>
13 years agoconfig: Use the xen-acpi-processor instead of the cpufreq-xen driver.
Konrad Rzeszutek Wilk [Wed, 14 Mar 2012 00:47:44 +0000 (20:47 -0400)]
config: Use the xen-acpi-processor instead of the cpufreq-xen driver.

The xen-acpi-processor (CONFIG_XEN_ACPI_PROCESSOR=y) is a more modern
version of the cpufreq-xen driver that can automatically inhibit
the cpufreq scaling drivers.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/acpi-processor: C and P-state driver that uploads said data to hypervisor.
Konrad Rzeszutek Wilk [Fri, 3 Feb 2012 21:03:20 +0000 (16:03 -0500)]
xen/acpi-processor: C and P-state driver that uploads said data to hypervisor.

This driver solves three problems:
 1). Parse and upload ACPI0007 (or PROCESSOR_TYPE) information to the
     hypervisor - aka P-states (cpufreq data).
 2). Upload the the Cx state information (cpuidle data).
 3). Inhibit CPU frequency scaling drivers from loading.

The reason for wanting to solve 1) and 2) is such that the Xen hypervisor
is the only one that knows the CPU usage of different guests and can
make the proper decision of when to put CPUs and packages in proper states.
Unfortunately the hypervisor has no support to parse ACPI DSDT tables, hence it
needs help from the initial domain to provide this information. The reason
for 3) is that we do not want the initial domain to change P-states while the
hypervisor is doing it as well - it causes rather some funny cases of P-states
transitions.

For this to work, the driver parses the Power Management data and uploads said
information to the Xen hypervisor. It also calls acpi_processor_notify_smm()
to inhibit the other CPU frequency scaling drivers from being loaded.

Everything revolves around the 'struct acpi_processor' structure which
gets updated during the bootup cycle in different stages. At the startup, when
the ACPI parser starts, the C-state information is processed (processor_idle)
and saved in said structure as 'power' element. Later on, the CPU frequency
scaling driver (powernow-k8 or acpi_cpufreq), would call the the
acpi_processor_* (processor_perflib functions) to parse P-states information
and populate in the said structure the 'performance' element.

Since we do not want the CPU frequency scaling drivers from loading
we have to call the acpi_processor_* functions to parse the P-states and
call "acpi_processor_notify_smm" to stop them from loading.

There is also one oddity in this driver which is that under Xen, the
physical online CPU count can be different from the virtual online CPU count.
Meaning that the macros 'for_[online|possible]_cpu' would process only
up to virtual online CPU count. We on the other hand want to process
the full amount of physical CPUs. For that, the driver checks if the ACPI IDs
count is different from the APIC ID count - which can happen if the user
choose to use dom0_max_vcpu argument. In such a case a backup of the PM
structure is used and uploaded to the hypervisor.

[v1-v2: Initial RFC implementations that were posted]
[v3: Changed the name to passthru suggested by Pasi Kärkkäinen <pasik@iki.fi>]
[v4: Added vCPU != pCPU support - aka dom0_max_vcpus support]
[v5: Cleaned up the driver, fix bug under Athlon XP]
[v6: Changed the driver to a CPU frequency governor]
[v7: Jan Beulich <jbeulich@suse.com> suggestion to make it a cpufreq scaling driver
     made me rework it as driver that inhibits cpufreq scaling driver]
[v8: Per Jan's review comments, fixed up the driver]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Conflicts:

drivers/xen/Kconfig
drivers/xen/Makefile
include/xen/interface/platform.h

13 years agoRevert "Merge branch 'stable/cpufreq-xen.v6.rebased' into uek2-merge"
Konrad Rzeszutek Wilk [Wed, 14 Mar 2012 00:43:38 +0000 (20:43 -0400)]
Revert "Merge branch 'stable/cpufreq-xen.v6.rebased' into uek2-merge"

This reverts commit 2fa5344c95525da55cd6896af85541fc23c1bdc0, reversing
changes made to d696e467d97b748cab14eb1b9910bf45f2044033.

As the upstream version has changed course..

and also remove xen/processor-passthru.c which the git commit:
 696e467d97b748cab14eb1b9910bf45f2044033 should have done.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoSPEC: v2.6.39-200.0.1 UEK2 update 1
Guru Anbalagane [Sun, 11 Mar 2012 21:08:22 +0000 (14:08 -0700)]
SPEC: v2.6.39-200.0.1 UEK2 update 1
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoMerge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public into ovm...
Guru Anbalagane [Fri, 9 Mar 2012 01:35:18 +0000 (17:35 -0800)]
Merge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public into ovm-uek2

13 years agoMerge branch 'uek2-merge' of git://ca-git.us.oracle.com/linux-konrad-public into...
Guru Anbalagane [Fri, 9 Mar 2012 01:32:39 +0000 (17:32 -0800)]
Merge branch 'uek2-merge' of git://ca-git.us.oracle.com/linux-konrad-public into ovm-uek2

13 years agonfs: only dirty user pages in direct read code
Dave Kleikamp [Thu, 8 Mar 2012 19:05:17 +0000 (13:05 -0600)]
nfs: only dirty user pages in direct read code

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
13 years agoSPEC: v2.6.39-100.5.1
Guru Anbalagane [Wed, 7 Mar 2012 00:55:21 +0000 (16:55 -0800)]
SPEC: v2.6.39-100.5.1

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoproc: make sure mem_open() doesn't pin the target's memory
Oleg Nesterov [Tue, 31 Jan 2012 16:15:11 +0000 (17:15 +0100)]
proc: make sure mem_open() doesn't pin the target's memory

Once /proc/pid/mem is opened, the memory can't be released until
mem_release() even if its owner exits.

Change mem_open() to do atomic_inc(mm_count) + mmput(), this only
pins mm_struct. Change mem_rw() to do atomic_inc_not_zero(mm_count)
before access_remote_vm(), this verifies that this mm is still alive.

I am not sure what should mem_rw() return if atomic_inc_not_zero()
fails. With this patch it returns zero to match the "mm == NULL" case,
may be it should return -EINVAL like it did before e268337d.

Perhaps it makes sense to add the additional fatal_signal_pending()
check into the main loop, to ensure we do not hold this memory if
the target task was oom-killed.

Cc: stable@kernel.org
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 6d08f2c7139790c268820a2e590795cb8333181a)

For Oracle bug 13811116
Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoproc: mem_release() should check mm != NULL
Oleg Nesterov [Tue, 31 Jan 2012 16:14:38 +0000 (17:14 +0100)]
proc: mem_release() should check mm != NULL

mem_release() can hit mm == NULL, add the necessary check.

Cc: stable@kernel.org
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 71879d3cb3dd8f2dfdefb252775c1b3ea04a3dd4)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
For Oracle bug 13811116

13 years agoproc: unify mem_read() and mem_write()
Oleg Nesterov [Tue, 31 Jan 2012 16:14:54 +0000 (17:14 +0100)]
proc: unify mem_read() and mem_write()

commit 572d34b946bae070debd42db1143034d9687e13f upstream.

No functional changes, cleanup and preparation.

mem_read() and mem_write() are very similar. Move this code into the
new common helper, mem_rw(), which takes the additional "int write"
argument.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b49767a65a6454f7d546068a785e25dbb0eabbcd)
For Oracle bug 13811116

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoSPEC: v2.6.39-100.4.1
Guru Anbalagane [Thu, 1 Mar 2012 22:51:47 +0000 (14:51 -0800)]
SPEC: v2.6.39-100.4.1

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoMerge branch 'b2.6.39-100.3.1rpmsymlink' of git://ca-git.us.oracle.com/linux-muvarov...
Guru Anbalagane [Thu, 1 Mar 2012 22:45:11 +0000 (14:45 -0800)]
Merge branch 'b2.6.39-100.3.1rpmsymlink' of git://ca-git.us.oracle.com/linux-muvarov-public into uek2-stable

13 years agosysfs: restore upstream sysfs code
Guru Anbalagane [Thu, 1 Mar 2012 21:42:49 +0000 (13:42 -0800)]
sysfs: restore upstream sysfs code

Revert "Partial revert of mainline removal of deprecated sysfs interface for 13568528"

This reverts commit 0c01ee13c10ea3360d517f46cfbe26fd09ee1819.

13 years agoMerge branch 'uek2' of git://ca-git.us.oracle.com/linux-mason-public into uek2-stable
Guru Anbalagane [Thu, 1 Mar 2012 21:42:10 +0000 (13:42 -0800)]
Merge branch 'uek2' of git://ca-git.us.oracle.com/linux-mason-public into uek2-stable

13 years agorpm: remove symlink on uninstall
Maxim Uvarov [Thu, 1 Mar 2012 20:49:11 +0000 (12:49 -0800)]
rpm: remove symlink on uninstall

Orabug: 13791936
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoBtrfs: fix casting error in scrub reada code
Chris Mason [Tue, 28 Feb 2012 17:42:44 +0000 (12:42 -0500)]
Btrfs: fix casting error in scrub reada code

The reada code from scrub was casting down a u64 to
an unsigned long so it could insert it into a radix tree.

What it really wanted to do was cast down the result of a shift, instead
of casting down the u64.  The bug resulted in trying to insert our
reada struct into the wrong place, which caused soft lockups and other
problems.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoconfig: Enable Xen's PV USB, SCSI, MCE and Xen CPU freq driver
Konrad Rzeszutek Wilk [Mon, 27 Feb 2012 01:10:59 +0000 (20:10 -0500)]
config: Enable Xen's PV USB, SCSI, MCE and Xen CPU freq driver

drivers and modules. For both OL5 and OL6

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoMerge branch 'stable/cpufreq-xen.v6.rebased' into uek2-merge
Konrad Rzeszutek Wilk [Mon, 27 Feb 2012 01:08:48 +0000 (20:08 -0500)]
Merge branch 'stable/cpufreq-xen.v6.rebased' into uek2-merge

* stable/cpufreq-xen.v6.rebased:
  [CPUFREQ] xen: governor for Xen hypervisor frequency scaling.
  xen/enlighten: Expose MWAIT and MWAIT_LEAF if hypervisor OKs it.

Conflicts:
drivers/xen/Kconfig
drivers/xen/Makefile