profile/ivi/kernel-x86-ivi.git
11 years agolibceph: update ceph_osd_op_name()
Alex Elder [Fri, 15 Feb 2013 17:42:30 +0000 (11:42 -0600)]
libceph: update ceph_osd_op_name()

Update ceph_osd_op_name() to include the newly-added definitions in
"rados.h", and to match its counterpart in the user space code.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agolibceph: add ceph_osd_state_name()
Alex Elder [Fri, 15 Feb 2013 17:42:30 +0000 (11:42 -0600)]
libceph: add ceph_osd_state_name()

Add the definition of ceph_osd_state_name(), to match its
counterpart in user space.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agolibceph: update rados.h
Alex Elder [Fri, 15 Feb 2013 17:42:30 +0000 (11:42 -0600)]
libceph: update rados.h

Update most of "include/linux/ceph/rados.h" to match its user space
counterpart in "src/include/rados.h" in the ceph tree.

Almost everything that has changed is either:
    - added or revised comments
    - added definitions (therefore no real effect on existing code)
    - defining the same value a different way (e.g., "1 << 0" vs "1")

The only exceptions are:
    - The declaration of ceph_osd_state_name() was excluded; that
      will be inserted in the next patch.
    - ceph_osd_op_mode_read() and ceph_osd_op_mode_modify() are
      defined differently, but they were never used in the kernel
    - CEPH_OSD_FLAG_PEERSTAT is now CEPH_OSD_FLAG_PEERSTAT_OLD, but
      that was never used in the kernel

Anything that was present in this file but not in its user space
counterpart was left intact here.  I left the definitions of
EOLDSNAPC and EBLACKLISTED using numerical values here; I'm
not sure the right way to go with those.

This and the next two commits resolve:
    http://tracker.ceph.com/issues/4164

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agolibceph: kill ceph_osdc_wait_event()
Alex Elder [Fri, 15 Feb 2013 17:42:30 +0000 (11:42 -0600)]
libceph: kill ceph_osdc_wait_event()

There are no actual users of ceph_osdc_wait_event().  This would
have been one-shot events, but we no longer support those so just
get rid of this function.

Since this leaves nothing else that waits for the completion of an
event, we can get rid of the completion in a struct ceph_osd_event.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agolibceph: kill ceph_osdc_create_event() "one_shot" parameter
Alex Elder [Fri, 15 Feb 2013 17:42:30 +0000 (11:42 -0600)]
libceph: kill ceph_osdc_create_event() "one_shot" parameter

There is only one caller of ceph_osdc_create_event(), and it
provides 0 as its "one_shot" argument.  Get rid of that argument and
just use 0 in its place.

Replace the code in handle_watch_notify() that executes if one_shot
is nonzero in the event with a BUG_ON() call.

While modifying "osd_client.c", give handle_watch_notify() static
scope.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agolibceph: kill ceph_calc_raw_layout()
Alex Elder [Fri, 15 Feb 2013 17:42:29 +0000 (11:42 -0600)]
libceph: kill ceph_calc_raw_layout()

There is no caller of ceph_calc_raw_layout() outside of libceph, so
there's no need to export from the module.

Furthermore, there is only one caller, in calc_layout(), and it
is not much more than a simple wrapper for that function.

So get rid of ceph_calc_raw_layout() and embed it instead within
calc_layout().

While touching "osd_client.c", get rid of the unnecessary forward
declaration of __send_request().

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agolibdeph: don't export ceph_osdc_init() or ceph_osdc_stop()
Alex Elder [Fri, 15 Feb 2013 17:42:29 +0000 (11:42 -0600)]
libdeph: don't export ceph_osdc_init() or ceph_osdc_stop()

The only callers of ceph_osdc_init() and ceph_osdc_stop()
ceph_create_client() and ceph_destroy_client() (respectively)
and they are in the same kernel module as those two functions.
There's therefore no need to export those interfaces, so don't.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agolibceph: lock outside send_queued()
Alex Elder [Fri, 15 Feb 2013 17:42:29 +0000 (11:42 -0600)]
libceph: lock outside send_queued()

Two of the three callers of the osd client's send_queued() function
already hold the osd client mutex and drop it before the call.

Change send_queued() so it assumes the caller holds the mutex, and
update all callers accordingly.  Rename it __send_queued() to match
the convention used elsewhere in the file with respect to the lock.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoceph: kill ceph_osdc_new_request() "num_reply" parameter
Alex Elder [Fri, 15 Feb 2013 17:42:29 +0000 (11:42 -0600)]
ceph: kill ceph_osdc_new_request() "num_reply" parameter

The "num_reply" parameter to ceph_osdc_new_request() is never
used inside that function, so get rid of it.

Note that ceph_sync_write() passes 2 for that argument, while all
other callers pass 1.  It doesn't matter, but perhaps someone should
verify this doesn't indicate a problem.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoceph: kill ceph_osdc_writepages() "flags" parameter
Alex Elder [Fri, 15 Feb 2013 17:42:29 +0000 (11:42 -0600)]
ceph: kill ceph_osdc_writepages() "flags" parameter

There is only one caller of ceph_osdc_writepages(), and it always
passes 0 as its "flags" argument.  Get rid of that argument and
replace its use in ceph_osdc_writepages() with 0.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoceph: kill ceph_osdc_writepages() "dosync" parameter
Alex Elder [Fri, 15 Feb 2013 17:42:29 +0000 (11:42 -0600)]
ceph: kill ceph_osdc_writepages() "dosync" parameter

There is only one caller of ceph_osdc_writepages(), and it always
passes 0 as its "dosync" argument.  Get rid of that argument and
replace its use in ceph_osdc_writepages() with 0.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoceph: kill ceph_osdc_writepages() "nofail" parameter
Alex Elder [Fri, 15 Feb 2013 17:42:29 +0000 (11:42 -0600)]
ceph: kill ceph_osdc_writepages() "nofail" parameter

There is only one caller of ceph_osdc_writepages(), and it always
passes the value true as its "nofail" argument.  Get rid of that
argument and replace its use in ceph_osdc_writepages() with the
constant value true.

This and a number of cleanup patches that follow resolve:
    http://tracker.ceph.com/issues/4126

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agolibceph: improve packing in struct ceph_osd_req_op
Alex Elder [Thu, 14 Feb 2013 18:16:43 +0000 (12:16 -0600)]
libceph: improve packing in struct ceph_osd_req_op

The layout of struct ceph_osd_req_op leaves lots of holes.
Rearranging things a little for better field alignment
reduces the size by a third.

This resolves:
    http://tracker.ceph.com/issues/4163

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: add barriers near done flag operations
Alex Elder [Wed, 6 Feb 2013 05:41:50 +0000 (23:41 -0600)]
rbd: add barriers near done flag operations

Somehow, I missed this little item in Documentation/atomic_ops.txt:
    *** WARNING: atomic_read() and atomic_set() DO NOT IMPLY BARRIERS! ***

Create and use some helper functions that include the proper memory
barriers for manipulating the done field.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: turn off interrupts for open/remove locking
Alex Elder [Tue, 5 Feb 2013 19:23:12 +0000 (13:23 -0600)]
rbd: turn off interrupts for open/remove locking

This commit:
    bc7a62ee5 rbd: prevent open for image being removed
added checking for removing rbd before allowing an open, and used
the same request spinlock for protecting that and updating the open
count as is used for the request queue.

However it used the non-irq protected version of the spinlocks.
Fix that.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agolibceph: don't require r_num_pages for bio requests
Alex Elder [Thu, 31 Jan 2013 22:02:00 +0000 (16:02 -0600)]
libceph: don't require r_num_pages for bio requests

There is a check in the completion path for osd requests that
ensures the number of pages allocated is enough to hold the amount
of incoming data expected.

For bio requests coming from rbd the "number of pages" is not really
meaningful (although total length would be).  So stop requiring that
nr_pages be supplied for bio requests.  This is done by checking
whether the pages pointer is null before checking the value of
nr_pages.

Note that this value is passed on to the messenger, but there it's
only used for debugging--it's never used for validation.

While here, change another spot that used r_pages in a debug message
inappropriately, and also invalidate the r_con_filling_msg pointer
after dropping a reference to it.

This resolves:
    http://tracker.ceph.com/issues/3875

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: don't take extra bio reference for osd client
Alex Elder [Wed, 30 Jan 2013 17:13:33 +0000 (11:13 -0600)]
rbd: don't take extra bio reference for osd client

Currently, if the OSD client finds an osd request has had a bio list
attached to it, it drops a reference to it (or rather, to the first
entry on that list) when the request is released.

The code that added that reference (i.e., the rbd client) is
therefore required to take an extra reference to that first bio
structure.

The osd client doesn't really do anything with the bio pointer other
than transfer it from the osd request structure to outgoing (for
writes) and ingoing (for reads) messages.  So it really isn't the
right place to be taking or dropping references.

Furthermore, the rbd client already holds references to all bio
structures it passes to the osd client, and holds them until the
request is completed.  So there's no need for this extra reference
whatsoever.

So remove the bio_put() call in ceph_osdc_release_request(), as
well as its matching bio_get() call in rbd_osd_req_create().

This change could lead to a crash if old libceph.ko was used with
new rbd.ko.  Add a compatibility check at rbd initialization time to
avoid this possibilty.

This resolves:
    http://tracker.ceph.com/issues/3798    and
    http://tracker.ceph.com/issues/3799

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agolibceph: add a compatibility check interface
Alex Elder [Wed, 30 Jan 2013 17:13:33 +0000 (11:13 -0600)]
libceph: add a compatibility check interface

An upcoming change implements semantic change that could lead to
a crash if an old version of the libceph kernel module is used with
a new version of the rbd kernel module.

In order to preclude that possibility, this adds a compatibilty
check interface.  If this interface doesn't exist, the modules are
obviously not compatible.  But if it does exist, this provides a way
of letting the caller know whether it will operate properly with
this libceph module.

Perhaps confusingly, it returns false right now.  The semantic
change mentioned above will make it return true.

This resolves:
    http://tracker.ceph.com/issues/3800

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: prevent open for image being removed
Alex Elder [Mon, 14 Jan 2013 18:43:31 +0000 (12:43 -0600)]
rbd: prevent open for image being removed

An open request for a mapped rbd image can arrive while removal of
that mapping is underway.  We need to prevent such an open request
from succeeding.  (It appears that Maciej Galkiewicz ran into this
problem.)

Define and use a "removing" flag to indicate a mapping is getting
removed.  Set it in the remove path after verifying nothing holds
the device open.  And check it in the open path before allowing the
open to proceed.  Acquire the rbd device's lock around each of these
spots to avoid any races accessing the flags and open_count fields.

This addresses:
    http://tracker.newdream.net/issues/3427

Reported-by: Maciej Galkiewicz <maciejgalkiewicz@ragnarson.com>
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: define flags field, use it for exists flag
Alex Elder [Mon, 14 Jan 2013 18:43:31 +0000 (12:43 -0600)]
rbd: define flags field, use it for exists flag

Define a new rbd device flags field, manipulated using bit
operations.  Replace the use of the current "exists" flag with a bit
in this new "flags" field.  Add a little commentary about the
"exists" flag, which does not need to be manipulated atomically.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: don't drop watch requests on completion
Alex Elder [Fri, 25 Jan 2013 23:08:55 +0000 (17:08 -0600)]
rbd: don't drop watch requests on completion

When we register an osd request to linger, it means that request
will stay around (under control of the osd client) until we've
unregistered it.  We do that for an rbd image's header object, and
we keep a pointer to the object request associated with it.

Keep a reference to the watch object request for as long as it is
registered to linger.  Drop it again after we've removed the linger
registration.

This resolves:
    http://tracker.ceph.com/issues/3937

(Note: this originally came about because the osd client was
issuing a callback more than once.  But that behavior will be
changing soon, documented in tracker issue 3967.)

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: decrement obj request count when deleting
Alex Elder [Fri, 25 Jan 2013 23:08:55 +0000 (17:08 -0600)]
rbd: decrement obj request count when deleting

Decrement the obj_request_count value when deleting an object
request from its image request's list.  Rearrange a few lines
in the surrounding code.

This resolves:
    http://tracker.ceph.com/issues/3940

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: track object rather than osd request for watch
Alex Elder [Fri, 25 Jan 2013 23:08:55 +0000 (17:08 -0600)]
rbd: track object rather than osd request for watch

Switch to keeping track of the object request pointer rather than
the osd request used to watch the rbd image header object.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: unregister linger in watch sync routine
Alex Elder [Fri, 25 Jan 2013 23:08:55 +0000 (17:08 -0600)]
rbd: unregister linger in watch sync routine

Move the code that unregisters an rbd device's lingering header
object watch request into rbd_dev_header_watch_sync(), so it
occurs in the same function that originally sets up that request.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: get rid of rbd_req_sync_exec()
Alex Elder [Sun, 20 Jan 2013 20:44:42 +0000 (14:44 -0600)]
rbd: get rid of rbd_req_sync_exec()

Get rid rbd_req_sync_exec() because it is no longer used.  That
eliminates the last use of rbd_req_sync_op(), so get rid of that
too.  And finally, that leaves rbd_do_request() unreferenced, so get
rid of that.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: implement sync method with new code
Alex Elder [Sat, 19 Jan 2013 06:30:28 +0000 (00:30 -0600)]
rbd: implement sync method with new code

Reimplement synchronous object method calls using the new request
tracking code.  Use the name rbd_obj_method_sync()

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: send notify ack asynchronously
Alex Elder [Thu, 17 Jan 2013 18:18:46 +0000 (12:18 -0600)]
rbd: send notify ack asynchronously

When we receive notification of a change to an rbd image's header
object we need to refresh our information about the image (its
size and snapshot context).  Once we have refreshed our rbd image
we need to acknowledge the notification.

This acknowledgement was previously done synchronously, but there's
really no need to wait for it to complete.

Change it so the caller doesn't wait for the notify acknowledgement
request to complete.  And change the name to reflect it's no longer
synchronous.

This resolves:
    http://tracker.newdream.net/issues/3877

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: get rid of rbd_req_sync_notify_ack()
Alex Elder [Sun, 20 Jan 2013 20:44:42 +0000 (14:44 -0600)]
rbd: get rid of rbd_req_sync_notify_ack()

Get rid rbd_req_sync_notify_ack() because it is no longer used.
As a result rbd_simple_req_cb() becomes unreferenced, so get rid
of that too.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: use new code for notify ack
Alex Elder [Fri, 30 Nov 2012 23:53:04 +0000 (17:53 -0600)]
rbd: use new code for notify ack

Use the new object request tracking mechanism for handling a
notify_ack request.

Move the callback function below the definition of this so we don't
have to do a pre-declaration.

This resolves:
    http://tracker.newdream.net/issues/3754

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: get rid of rbd_req_sync_watch()
Alex Elder [Sun, 20 Jan 2013 20:44:42 +0000 (14:44 -0600)]
rbd: get rid of rbd_req_sync_watch()

Get rid of rbd_req_sync_watch(), because it is no longer used.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: implement watch/unwatch with new code
Alex Elder [Fri, 18 Jan 2013 18:31:10 +0000 (12:31 -0600)]
rbd: implement watch/unwatch with new code

Implement a new function to set up or tear down a watch event
for an mapped rbd image header using the new request code.

Create a new object request type "nodata" to handle this.  And
define rbd_osd_trivial_callback() which simply marks a request done.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: get rid of rbd_req_sync_read()
Alex Elder [Sun, 20 Jan 2013 20:44:42 +0000 (14:44 -0600)]
rbd: get rid of rbd_req_sync_read()

Delete rbd_req_sync_read() is no longer used, so get rid of it.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: implement sync object read with new code
Alex Elder [Thu, 17 Jan 2013 18:25:27 +0000 (12:25 -0600)]
rbd: implement sync object read with new code

Reimplement the synchronous read operation used for reading a
version 1 header using the new request tracking code.  Name the
resulting function rbd_obj_read_sync() to better reflect that
it's a full object operation, not an object request.  To do this,
implement a new OBJ_REQUEST_PAGES object request type.

This implements a new mechanism to allow the caller to wait for
completion for an rbd_obj_request by calling rbd_obj_request_wait().

This partially resolves:
    http://tracker.newdream.net/issues/3755

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: kill rbd_req_coll and rbd_request
Alex Elder [Fri, 30 Nov 2012 23:53:04 +0000 (17:53 -0600)]
rbd: kill rbd_req_coll and rbd_request

The two remaining callers of rbd_do_request() always pass a null
collection pointer, so the "coll" and "coll_index" parameters are
not needed.  There is no other use of that data structure, so it
can be eliminated.

Deleting them means there is no need to allocate a rbd_request
structure for the callback function.  And since that's the only use
of *that* structure, it too can be eliminated.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: kill rbd_rq_fn() and all other related code
Alex Elder [Fri, 30 Nov 2012 23:53:04 +0000 (17:53 -0600)]
rbd: kill rbd_rq_fn() and all other related code

Now that the request function has been replaced by one using the new
request management data structures the old one can go away.
Deleting it makes rbd_dev_do_request() no longer needed, and
deleting that makes other functions unneeded, and so on.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: new request tracking code
Alex Elder [Thu, 22 Nov 2012 06:00:08 +0000 (00:00 -0600)]
rbd: new request tracking code

This patch fully implements the new request tracking code for rbd
I/O requests.

Each I/O request to an rbd image will get an rbd_image_request
structure allocated to track it.  This provides access to all
information about the original request, as well as access to the
set of one or more object requests that are initiated as a result
of the image request.

An rbd_obj_request structure defines a request sent to a single osd
object (possibly) as part of an rbd image request.  An rbd object
request refers to a ceph_osd_request structure built up to represent
the request; for now it will contain a single osd operation.  It
also provides space to hold the result status and the version of the
object when the osd request completes.

An rbd_obj_request structure can also stand on its own.  This will
be used for reading the version 1 header object, for issuing
acknowledgements to event notifications, and for making object
method calls.

All rbd object requests now complete asynchronously with respect
to the osd client--they supply a common callback routine.

This resolves:
    http://tracker.newdream.net/issues/3741

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agolibceph: fix messenger CONFIG_BLOCK dependencies
Alex Elder [Thu, 31 Jan 2013 22:02:01 +0000 (16:02 -0600)]
libceph: fix messenger CONFIG_BLOCK dependencies

The ceph messenger has a few spots that are only used when
bio messages are supported, and that's only when CONFIG_BLOCK
is defined.  This surrounds a couple of spots with #ifdef's
that would cause a problem if CONFIG_BLOCK were not present
in the kernel configuration.

This resolves:
    http://tracker.ceph.com/issues/3976

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoceph: implement hidden per-field ceph.*.layout.* vxattrs
Sage Weil [Mon, 21 Jan 2013 06:08:33 +0000 (22:08 -0800)]
ceph: implement hidden per-field ceph.*.layout.* vxattrs

Allow individual fields of the layout to be fetched via getxattr.
The ceph.dir.layout.* vxattr with "disappear" if the exists_cb
indicates there no dir layout set.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Lang <sam.lang@inktank.com>
11 years agoceph: add ceph.dir.layout vxattr
Sage Weil [Mon, 21 Jan 2013 06:07:12 +0000 (22:07 -0800)]
ceph: add ceph.dir.layout vxattr

This virtual xattr will only appear when there is a dir layout policy
set on the directory.  It can be set via setxattr and removed via
removexattr (implemented by the MDS).

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Lang <sam.lang@inktank.com>
11 years agoceph: change ceph.file.layout.* implementation, content
Sage Weil [Sun, 20 Jan 2013 00:46:32 +0000 (16:46 -0800)]
ceph: change ceph.file.layout.* implementation, content

Implement a new method to generate the ceph.file.layout vxattr using
the new framework.

Use 'stripe_unit' instead of 'chunk_size'.

Include pool name, either as a string or as an integer.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Lang <sam.lang@inktank.com>
11 years agoceph: fix listxattr handling for vxattrs
Sage Weil [Mon, 21 Jan 2013 06:02:39 +0000 (22:02 -0800)]
ceph: fix listxattr handling for vxattrs

Only include vxattrs in the result if they are not hidden and exist
(as determined by the exists_cb callback).

Note that the buffer size we return when 0 is passed in always includes
vxattrs that *might* exist, forming an upper bound.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Lang <sam.lang@inktank.com>
11 years agoceph: fix getxattr vxattr handling
Sage Weil [Mon, 21 Jan 2013 06:00:58 +0000 (22:00 -0800)]
ceph: fix getxattr vxattr handling

Change the vxattr handling for getxattr so that vxattrs are checked
prior to any xattr content, and never after.  Enforce vxattr existence
via the exists_cb callback.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Lang <sam.lang@inktank.com>
11 years agoceph: add exists_cb to vxattr struct
Sage Weil [Mon, 21 Jan 2013 05:59:29 +0000 (21:59 -0800)]
ceph: add exists_cb to vxattr struct

Allow for a callback to dynamically determine if a vxattr exists for
the given inode.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Lang <sam.lang@inktank.com>
11 years agoceph: pass ceph.* removexattrs through to MDS
Sage Weil [Mon, 21 Jan 2013 05:55:30 +0000 (21:55 -0800)]
ceph: pass ceph.* removexattrs through to MDS

If we do not explicitly recognized a vxattr (e.g., as readonly), pass
the request through to the MDS and deal with it there.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Lang <sam.lang@inktank.com>
11 years agoceph: pass unhandled ceph.* setxattrs through to MDS
Sage Weil [Thu, 31 Jan 2013 19:53:41 +0000 (11:53 -0800)]
ceph: pass unhandled ceph.* setxattrs through to MDS

If we do not specifically understand a setxattr on a ceph.* virtual
xattr, send it through to the MDS.  This allows us to implement new
functionality via the MDS without direct support on the client side.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Lang <sam.lang@inktank.com>
11 years agoceph: support hidden vxattrs
Sage Weil [Thu, 31 Jan 2013 19:53:27 +0000 (11:53 -0800)]
ceph: support hidden vxattrs

Add ability to flag virtual xattrs as hidden, such that you can
getxattr them but they do not appear in listxattr.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Lang <sam.lang@inktank.com>
11 years agoceph: remove 'ceph.layout' virtual xattr
Sage Weil [Thu, 31 Jan 2013 19:53:05 +0000 (11:53 -0800)]
ceph: remove 'ceph.layout' virtual xattr

This has been deprecated since v3.3, 114fc474.  Kill it.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Lang <sam.lang@inktank.com>
11 years agoMerge branch 'testing' of github.com:ceph/ceph-client into v3.8-rc5-testing
Alex Elder [Wed, 30 Jan 2013 13:54:34 +0000 (07:54 -0600)]
Merge branch 'testing' of github.com:ceph/ceph-client into v3.8-rc5-testing

11 years agolibceph: fix undefined behavior when using snprintf()
Cong Ding [Fri, 25 Jan 2013 23:48:59 +0000 (17:48 -0600)]
libceph: fix undefined behavior when using snprintf()

The variable "str" is used as both the source and destination in
function snprintf(), which is undefined behavior based on C11. The
original description in C11 is:
"If copying takes place between objects that
overlap, the behavior is undefined."

And, the function of ceph_osdmap_state_str() is to return the osdmap
state, so it should return "doesn't exist" when all the conditions
are not satisfied. I fix it in this patch.

[elder@inktank.com: shortened the commit message]

Signed-off-by: Cong Ding <dinggnu@gmail.com>
Reviewed-by: Alex Elder <elder@inktank.com>
11 years agorbd: don't retry setting up header watch
Alex Elder [Fri, 18 Jan 2013 18:31:09 +0000 (12:31 -0600)]
rbd: don't retry setting up header watch

When an rbd image is initially mapped a watch event is registered so
we can do something if the header object changes.

The code that does this currently loops if initiating the watch
request results in an ERANGE error.  The osds will never return
ERANGE, so there's no reason to do this loop, so get rid of it.

This resolves:
    http://tracker.newdream.net/issues/3860

Note that the problem this loop was intended to solve is a race
between collecting image header information and setting up the watch
on the header object.  The real fix for that problem is described
here:
    http://tracker.newdream.net/issues/3871

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: check for overflow in rbd_get_num_segments()
Alex Elder [Thu, 10 Jan 2013 18:56:58 +0000 (12:56 -0600)]
rbd: check for overflow in rbd_get_num_segments()

The return type of rbd_get_num_segments() is int, but the values it
operates on are u64.  Although it's not likely, there's no guarantee
the result won't exceed what can be respresented in an int.  The
function is already designed to return -ERANGE on error, so just add
this possible overflow as another reason to return that.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: small changes
Alex Elder [Sun, 20 Jan 2013 20:44:42 +0000 (14:44 -0600)]
rbd: small changes

A few very minor changes to the rbd code:
    - RBD_MAX_OPT_LEN is unused, so get rid of it
    - Consolidate rbd options definitions
    - Make rbd_segment_name() return pointer to const char

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoLinux 3.8-rc5 v3.8-rc5
Linus Torvalds [Fri, 25 Jan 2013 19:57:28 +0000 (11:57 -0800)]
Linux 3.8-rc5

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Fri, 25 Jan 2013 18:55:21 +0000 (10:55 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs

Pull btrfs fixes from Chris Mason:
 "It turns out that we had two crc bugs when running fsx-linux in a
  loop.  Many thanks to Josef, Miao Xie, and Dave Sterba for nailing it
  all down.  Miao also has a new OOM fix in this v2 pull as well.

  Ilya fixed a regression Liu Bo found in the balance ioctls for pausing
  and resuming a running balance across drives.

  Josef's orphan truncate patch fixes an obscure corruption we'd see
  during xfstests.

  Arne's patches address problems with subvolume quotas.  If the user
  destroys quota groups incorrectly the FS will refuse to mount.

  The rest are smaller fixes and plugs for memory leaks."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (30 commits)
  Btrfs: fix repeated delalloc work allocation
  Btrfs: fix wrong max device number for single profile
  Btrfs: fix missed transaction->aborted check
  Btrfs: Add ACCESS_ONCE() to transaction->abort accesses
  Btrfs: put csums on the right ordered extent
  Btrfs: use right range to find checksum for compressed extents
  Btrfs: fix panic when recovering tree log
  Btrfs: do not allow logged extents to be merged or removed
  Btrfs: fix a regression in balance usage filter
  Btrfs: prevent qgroup destroy when there are still relations
  Btrfs: ignore orphan qgroup relations
  Btrfs: reorder locks and sanity checks in btrfs_ioctl_defrag
  Btrfs: fix unlock order in btrfs_ioctl_rm_dev
  Btrfs: fix unlock order in btrfs_ioctl_resize
  Btrfs: fix "mutually exclusive op is running" error code
  Btrfs: bring back balance pause/resume logic
  btrfs: update timestamps on truncate()
  btrfs: fix btrfs_cont_expand() freeing IS_ERR em
  Btrfs: fix a bug when llseek for delalloc bytes behind prealloc extents
  Btrfs: fix off-by-one in lseek
  ...

11 years agoMerge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Fri, 25 Jan 2013 03:15:43 +0000 (19:15 -0800)]
Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs fixes from Steve French:
 "Two small cifs fixes"

* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
  fs/cifs/cifs_dfs_ref.c: fix potential memory leakage
  cifs: fix srcip_matches() for ipv6

11 years agoMerge git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Fri, 25 Jan 2013 03:14:22 +0000 (19:14 -0800)]
Merge git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm fixlet from Marcelo Tosatti.

* git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: PPC: Emulate dcbf

11 years agoMerge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Linus Torvalds [Thu, 24 Jan 2013 20:44:57 +0000 (12:44 -0800)]
Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm

Pull ARM fixes from Russell King:
 "A number of fixes:

  Patrik found a problem with preempt counting in the VFP assembly
  functions which can cause the preempt count to be upset.

  Nicolas fixed a problem with the parsing of the DT when it straddles a
  1MB boundary.

  Subhash Jadavani reported a problem with sparsemem and our highmem
  support for cache maintanence for DMA areas, and TI found a bug in
  their strongly ordered memory mapping type.

  Also, three fixes by way of Will Deacon's tree from Dave Martin for
  instruction compatibility and Marc Zyngier to fix hypervisor boot mode
  issues."

* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
  ARM: 7629/1: mm: Fix missing XN flag for for MT_MEMORY_SO
  ARM: DMA: Fix struct page iterator in dma_cache_maint() to work with sparsemem
  ARM: 7628/1: head.S: map one extra section for the ATAG/DTB area
  ARM: 7627/1: Predicate preempt logic on PREEMP_COUNT not PREEMPT alone
  ARM: virt: simplify __hyp_stub_install epilog
  ARM: virt: boot secondary CPUs through the right entry point
  ARM: virt: Avoid bx instruction for compatibility with <=ARMv4

11 years agoMerge tag 'fixes-for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Thu, 24 Jan 2013 20:42:50 +0000 (12:42 -0800)]
Merge tag 'fixes-for-linus2' of git://git./linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "Here's a long-pending fixes pull request for arm-soc (I didn't send
  one in the -rc4 cycle).

  The larger deltas are from:

   - A fixup of error paths in the mvsdio driver

   - Header file move for a driver that hadn't been properly converted
     to multiplatform on i.MX, which was causing build failures when
     included

   - Device tree updates for at91 dealing mostly with their new pinctrl
     setup merged in 3.8 and mistakes in those initial configs

  The rest are the normal mix of small fixes all over the place; sunxi,
  omap, imx, mvebu, etc, etc."

* tag 'fixes-for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (40 commits)
  mfd: vexpress-sysreg: Don't skip initialization on probe
  ARM: vexpress: Enable A7 cores in V2P-CA15_A7's Device Tree
  ARM: vexpress: extend the MPIDR range used for pen release check
  ARM: at91/dts: correct comment in at91sam9x5.dtsi for mii
  ARM: at91/at91_dt_defconfig: add at91sam9n12 SoC to DT defconfig
  ARM: at91/at91_dt_defconfig: remove memory specification to cmdline
  ARM: at91/dts: add macb mii pinctrl config for kizbox
  ARM: at91: rm9200: remake the BGA as default version
  ARM: at91: fix gpios on i2c-gpio for RM9200 DT
  ARM: at91/at91sam9x5 DTS: add SCK USART pins
  ARM: at91/at91sam9x5 DTS: correct wrong PIO BANK values on u(s)arts
  ARM: at91/at91-pinctrl documentation: fix typo and add some details
  ARM: kirkwood: fix missing #interrupt-cells property
  mmc: mvsdio: use devm_ API to simplify/correct error paths.
  clk: mvebu/clk-cpu.c: fix memory leakage
  ARM: OMAP2+: omap4-panda: add UART2 muxing for WiLink shared transport
  ARM: OMAP2+: DT node Timer iteration fix
  ARM: OMAP2+: Fix section warning for omap_init_ocp2scp()
  ARM: OMAP2+: fix build break for omapdrm
  ARM: OMAP2: Fix missing omap2xxx_clkt_vps_late_init function calls
  ...

11 years agoMerge tag 'pm+acpi-for-3.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 24 Jan 2013 18:19:13 +0000 (10:19 -0800)]
Merge tag 'pm+acpi-for-3.8-rc5' of git://git./linux/kernel/git/rafael/linux-pm

Pull ACPI and power management fixes from Rafael Wysocki:

 - Two cpuidle initialization fixes from Konrad Rzeszutek Wilk.

 - cpufreq regression fixes for AMD processors from Borislav Petkov,
   Stefan Bader, and Matthew Garrett.

 - ACPI cpufreq fix from Thomas Schlichter.

 - cpufreq and devfreq fixes related to incorrect usage of operating
   performance points (OPP) framework and RCU from Nishanth Menon.

 - APEI workaround for incorrect BIOS information from Lans Zhang.

* tag 'pm+acpi-for-3.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpufreq: Add module aliases for acpi-cpufreq
  ACPI: Check MSR valid bit before using P-state frequencies
  PM / devfreq: exynos4_bus: honor RCU lock usage
  PM / devfreq: add locking documentation for recommended_opp
  cpufreq: cpufreq-cpu0: use RCU locks around usage of OPP
  cpufreq: OMAP: use RCU locks around usage of OPP
  ACPI, APEI: Fixup incorrect 64-bit access width firmware bug
  ACPI / processor: Get power info before updating the C-states
  powernow-k8: Add a kconfig dependency on acpi-cpufreq
  ACPI / cpuidle: Fix NULL pointer issues when cpuidle is disabled
  intel_idle: Don't register CPU notifier if we are not running.

11 years agoMerge tag 'regmap-fix-3.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broon...
Linus Torvalds [Thu, 24 Jan 2013 18:18:37 +0000 (10:18 -0800)]
Merge tag 'regmap-fix-3.8-rc4' of git://git./linux/kernel/git/broonie/regmap

Pull regmap fixes from Mark Brown:
 "One more oversight in the debugfs code was reported and fixed, plus a
  documentation fix."

* tag 'regmap-fix-3.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: fix small typo in regmap_bulk_write comment
  regmap: debugfs: Fix seeking from the cache

11 years agoMerge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Linus Torvalds [Thu, 24 Jan 2013 18:17:49 +0000 (10:17 -0800)]
Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma

Pull slave-dmaengine fixes from Vinod Koul:
 "A few fixes on slave dmanengine.  There are trivial fixes in imx-dma,
  tegra-dma & ioat driver"

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
  dma: tegra: implement flags parameters for cyclic transfer
  dmaengine: imx-dma: Disable use of hw_chain to fix sg_dma transfers.
  ioat: Fix DMA memory sync direction correct flag

11 years agoMerge branch 'i2c-embedded/for-current' of git://git.pengutronix.de/git/wsa/linux
Linus Torvalds [Thu, 24 Jan 2013 18:17:03 +0000 (10:17 -0800)]
Merge branch 'i2c-embedded/for-current' of git://git.pengutronix.de/git/wsa/linux

Pill i2c fixes from Wolfram Sang:
 "Here are a few, typical driver fixes for the I2C subsystem"

* 'i2c-embedded/for-current' of git://git.pengutronix.de/git/wsa/linux:
  i2c-designware: add missing MODULE_LICENSE
  i2c: omap: fix draining irq handling
  i2c: omap: errata i462: fix incorrect ack for arbitration lost interrupt
  i2c: muxes: fix wrong use of sizeof(ptr)
  i2c: sirf: register i2c_client from dt child-nodes in probe entry
  i2c: mxs: Fix type of error code
  i2c: mxs: Fix misuse init_completion

11 years agoBtrfs: fix repeated delalloc work allocation
Miao Xie [Tue, 22 Jan 2013 10:49:00 +0000 (10:49 +0000)]
Btrfs: fix repeated delalloc work allocation

btrfs_start_delalloc_inodes() locks the delalloc_inodes list, fetches the
first inode, unlocks the list, triggers btrfs_alloc_delalloc_work/
btrfs_queue_worker for this inode, and then it locks the list, checks the
head of the list again. But because we don't delete the first inode that it
deals with before, it will fetch the same inode. As a result, this function
allocates a huge amount of btrfs_delalloc_work structures, and OOM happens.

Fix this problem by splice this delalloc list.

Reported-by: Alex Lyakas <alex.btrfs@zadarastorage.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
11 years agoBtrfs: fix wrong max device number for single profile
Miao Xie [Wed, 16 Jan 2013 11:27:17 +0000 (11:27 +0000)]
Btrfs: fix wrong max device number for single profile

The max device number of single profile is 1, not 0 (0 means 'as many as
possible'). Fix it.

Cc: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
11 years agoBtrfs: fix missed transaction->aborted check
Miao Xie [Tue, 15 Jan 2013 06:29:12 +0000 (06:29 +0000)]
Btrfs: fix missed transaction->aborted check

First, though the current transaction->aborted check can stop the commit early
and avoid unnecessary operations, it is too early, and some transaction handles
don't end, those handles may set transaction->aborted after the check.

Second, when we commit the transaction, we will wake up some worker threads to
flush the space cache and inode cache. Those threads also allocate some transaction
handles and may set transaction->aborted if some serious error happens.

So we need more check for ->aborted when committing the transaction. Fix it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
11 years agoBtrfs: Add ACCESS_ONCE() to transaction->abort accesses
Miao Xie [Tue, 15 Jan 2013 06:27:25 +0000 (06:27 +0000)]
Btrfs: Add ACCESS_ONCE() to transaction->abort accesses

We may access and update transaction->aborted on the different CPUs without
lock, so we need ACCESS_ONCE() wrapper to prevent the compiler from creating
unsolicited accesses and make sure we can get the right value.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
11 years agoBtrfs: put csums on the right ordered extent
Josef Bacik [Tue, 22 Jan 2013 20:43:09 +0000 (15:43 -0500)]
Btrfs: put csums on the right ordered extent

I noticed a WARN_ON going off when adding csums because we were going over
the amount of csum bytes that should have been allowed for an ordered
extent.  This is a leftover from when we used to hold the csums privately
for direct io, but now we use the normal ordered sum stuff so we need to
make sure and check if we've moved on to another extent so that the csums
are added to the right extent.  Without this we could end up with csums for
bytenrs that don't have extents to cover them yet.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
11 years agoBtrfs: use right range to find checksum for compressed extents
Liu Bo [Sun, 6 Jan 2013 03:38:22 +0000 (03:38 +0000)]
Btrfs: use right range to find checksum for compressed extents

For compressed extents, the range of checksum is covered by disk length,
and the disk length is different with ram length, so we need to use disk
length instead to get us the right checksum.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
11 years agoBtrfs: fix panic when recovering tree log
Josef Bacik [Tue, 18 Dec 2012 16:39:19 +0000 (11:39 -0500)]
Btrfs: fix panic when recovering tree log

A user reported a BUG_ON(ret) that occured during tree log replay.  Ret was
-EAGAIN, so what I think happened is that we removed an extent that covered
a bitmap entry and an extent entry.  We remove the part from the bitmap and
return -EAGAIN and then search for the next piece we want to remove, which
happens to be an entire extent entry, so we just free the sucker and return.
The problem is ret is still set to -EAGAIN so we trip the BUG_ON().  The
user used btrfs-zero-log so I'm not 100% sure this is what happened so I've
added a WARN_ON() to catch the other possibility.  Thanks,

Reported-by: Jan Steffens <jan.steffens@gmail.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
11 years agoBtrfs: do not allow logged extents to be merged or removed
Josef Bacik [Thu, 24 Jan 2013 17:02:07 +0000 (12:02 -0500)]
Btrfs: do not allow logged extents to be merged or removed

We drop the extent map tree lock while we're logging extents, so somebody
could come in and merge another extent into this one and screw up our
logging, or they could even remove us from the list which would keep us from
logging the extent or freeing our ref on it, so we need to make sure to not
clear LOGGING until after the extent is logged, and then we can merge it to
adjacent extents.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
11 years agoMerge branch 'vexpress/fixes' of git://git.linaro.org/people/pawelmoll/linux into...
Olof Johansson [Thu, 24 Jan 2013 16:12:24 +0000 (08:12 -0800)]
Merge branch 'vexpress/fixes' of git://git.linaro.org/people/pawelmoll/linux into fixes

From Pawel Moll:
- makes the V2P-CA15_A7 (a.k.a. TC2) work with 3.8 kernels
- improves vexpress-sysreg.c behaviour on arm64 platforms

* 'vexpress/fixes' of git://git.linaro.org/people/pawelmoll/linux:
  mfd: vexpress-sysreg: Don't skip initialization on probe
  ARM: vexpress: Enable A7 cores in V2P-CA15_A7's Device Tree
  ARM: vexpress: extend the MPIDR range used for pen release check

11 years agoMerge tag 'at91-fixes' of git://github.com/at91linux/linux-at91 into fixes
Olof Johansson [Thu, 24 Jan 2013 15:49:49 +0000 (07:49 -0800)]
Merge tag 'at91-fixes' of git://github.com/at91linux/linux-at91 into fixes

From Nicolas Ferre:
Here are fixes for AT91 that are mainly related to device tree.
One RM9200 setup option is the only C code change.
Some documentation changes can clarify the pinctrl use.
Then, some defconfig modifications are allowing the affected platforms
to boot.

* tag 'at91-fixes' of git://github.com/at91linux/linux-at91:
  ARM: at91/dts: correct comment in at91sam9x5.dtsi for mii
  ARM: at91/at91_dt_defconfig: add at91sam9n12 SoC to DT defconfig
  ARM: at91/at91_dt_defconfig: remove memory specification to cmdline
  ARM: at91/dts: add macb mii pinctrl config for kizbox
  ARM: at91: rm9200: remake the BGA as default version
  ARM: at91: fix gpios on i2c-gpio for RM9200 DT
  ARM: at91/at91sam9x5 DTS: add SCK USART pins
  ARM: at91/at91sam9x5 DTS: correct wrong PIO BANK values on u(s)arts
  ARM: at91/at91-pinctrl documentation: fix typo and add some details

11 years agomfd: vexpress-sysreg: Don't skip initialization on probe
Pawel Moll [Tue, 27 Nov 2012 16:48:50 +0000 (16:48 +0000)]
mfd: vexpress-sysreg: Don't skip initialization on probe

The vexpress-sysreg driver does not have to be initialized
early, when the platform doesn't require this. Unfortunately
in such case it wasn't initialized correctly - master site
lookup and config bridge registration were missing. Fixed now.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
11 years agoARM: vexpress: Enable A7 cores in V2P-CA15_A7's Device Tree
Pawel Moll [Thu, 24 Jan 2013 11:48:54 +0000 (11:48 +0000)]
ARM: vexpress: Enable A7 cores in V2P-CA15_A7's Device Tree

As the kernel is able to cope with multiple clusters,
uncomment the A7 cores in the Device Tree for V2P-CA15_A7
tile, making all 5 cores available to the user.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
11 years agoARM: vexpress: extend the MPIDR range used for pen release check
Lorenzo Pieralisi [Tue, 22 Jan 2013 10:56:40 +0000 (10:56 +0000)]
ARM: vexpress: extend the MPIDR range used for pen release check

In ARM multi-cluster systems the MPIDR affinity level 0 cannot be used as a
single cpu identifier, affinity levels 1 and 2 must be taken into account as
well.
This patch extends the MPIDR usage to affinity levels 1 and 2 in versatile
secondary cores start up code in order to compare the passed pen_release
value with the full-blown affinity mask.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
11 years agoMerge remote-tracking branch 'regmap/fix/debugfs' into tmp
Mark Brown [Thu, 24 Jan 2013 11:04:16 +0000 (19:04 +0800)]
Merge remote-tracking branch 'regmap/fix/debugfs' into tmp

11 years agoMerge tag 'imx-fixes-3.8-3' of git://git.linaro.org/people/shawnguo/linux-2.6 into...
Olof Johansson [Thu, 24 Jan 2013 04:35:02 +0000 (20:35 -0800)]
Merge tag 'imx-fixes-3.8-3' of git://git.linaro.org/people/shawnguo/linux-2.6 into fixes

From Shawn Guo:

This is yet another critical imxfb fixes held off by absence of FB
maintainer for some time.

* tag 'imx-fixes-3.8-3' of git://git.linaro.org/people/shawnguo/linux-2.6:
  video: imxfb: Do not crash on reboot

11 years agoMerge tag 'mvebu_fixes_for_v3.8-rc5' of git://git.infradead.org/users/jcooper/linux...
Olof Johansson [Thu, 24 Jan 2013 04:30:52 +0000 (20:30 -0800)]
Merge tag 'mvebu_fixes_for_v3.8-rc5' of git://git.infradead.org/users/jcooper/linux into fixes

From Jason Cooper:

mvebu fixes for v3.8-rc5
 - fix memory leak in mvebu/clk-cpu.c
 - use devm_ to correct/simplify error paths in mvsdio
 - add missing #interrupt-cells property in kirkwood

* tag 'mvebu_fixes_for_v3.8-rc5' of git://git.infradead.org/users/jcooper/linux:
  ARM: kirkwood: fix missing #interrupt-cells property
  mmc: mvsdio: use devm_ API to simplify/correct error paths.
  clk: mvebu/clk-cpu.c: fix memory leakage

11 years agoMerge tag 'usb-3.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Thu, 24 Jan 2013 04:11:35 +0000 (20:11 -0800)]
Merge tag 'usb-3.8-rc4' of git://git./linux/kernel/git/gregkh/usb

Pull more USB fixes from Greg Kroah-Hartman:
 "Here are some more USB fixes for the 3.8-rc4 tree.

  Some gadget driver fixes, and finally resolved the ehci-mxc driver
  build issues (it's just some code moving around and being deleted)."

* tag 'usb-3.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: EHCI: fix build error in ehci-mxc
  USB: EHCI: add a name for the platform-private field
  USB: EHCI: fix incorrect configuration test
  USB: EHCI: Move definition of EHCI_STATS to ehci.h
  USB: UHCI: fix IRQ race during initialization
  usb: gadget: FunctionFS: Fix missing braces in parse_opts
  usb: dwc3: gadget: fix ep->maxburst for ep0
  ARM: i.MX clock: Change the connection-id for fsl-usb2-udc
  usb: gadget: fsl_mxc_udc: replace MX35_IO_ADDRESS to ioremap
  usb: gadget: fsl-mxc-udc: replace cpu_is_xxx() with platform_device_id
  usb: musb: cppi_dma: drop '__init' annotation

11 years agoMerge tag 'char-misc-3.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Thu, 24 Jan 2013 04:10:48 +0000 (20:10 -0800)]
Merge tag 'char-misc-3.8-rc4' of git://git./linux/kernel/git/gregkh/char-misc

Pull drivers/misc fix from Greg Kroah-Hartman:
 "Here is a single revert for the ti-st misc driver, fixing problem that
  was introduced in 3.7-rc1 that has been bothering people."

* tag 'char-misc-3.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  Revert "drivers/misc/ti-st: remove gpio handling"

11 years agoMerge tag 'tty-3.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Thu, 24 Jan 2013 04:09:58 +0000 (20:09 -0800)]
Merge tag 'tty-3.8-rc4' of git://git./linux/kernel/git/gregkh/tty

Pull a TTY maintainer patch from Greg Kroah-Hartman:
 "Just a MAINTAINERS update, now that Alan has left for a bit, I'll
  continue to watch over the serial drivers."

* tag 'tty-3.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  MAINTAINERS: Someone needs to watch over the serial drivers

11 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Thu, 24 Jan 2013 04:07:12 +0000 (20:07 -0800)]
Merge branch 'v4l_for_linus' of git://git./linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:
 - gspca: add needed delay for I2C traffic for sonixb/sonixj cameras
 - gspca: add one missing Kinect USB ID
 - usbvideo: some regression fixes
 - omap3isp: fix some build issues
 - videobuf2: fix video output handling
 - exynos s5p/m5mols: a few regression fixes.

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] uvcvideo: Set error_idx properly for S_EXT_CTRLS failures
  [media] uvcvideo: Cleanup leftovers of partial revert
  [media] uvcvideo: Return -EACCES when trying to set a read-only control
  [media] omap3isp: Don't include <plat/cpu.h>
  [media] s5p-mfc: Fix interrupt error handling routine
  [media] s5p-fimc: Fix return value of __fimc_md_create_flite_source_links()
  [media] m5mols: Fix typo in get_fmt callback
  [media] v4l: vb2: Set data_offset to 0 for single-plane output buffers
  [media] [FOR,v3.8] omap3isp: Don't include deleted OMAP plat/ header files
  [media] gspca_sonixj: Add a small delay after i2c_w1
  [media] gspca_sonixb: Properly wait between i2c writes
  [media] gspca_kinect: add Kinect for Windows USB id

11 years agoMAINTAINERS: Someone needs to watch over the serial drivers
Greg Kroah-Hartman [Wed, 23 Jan 2013 23:45:23 +0000 (15:45 -0800)]
MAINTAINERS: Someone needs to watch over the serial drivers

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux...
Linus Torvalds [Wed, 23 Jan 2013 21:31:15 +0000 (13:31 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/geert/linux-m68k

Pull m68k fixes from Geert Uytterhoeven:
 "The asm-generic changeset has been ack'ed by Arnd."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k: Wire up finit_module
  asm-generic/dma-mapping-broken.h: Provide dma_alloc_attrs()/dma_free_attrs()
  m68k: Provide dma_alloc_attrs()/dma_free_attrs()

11 years agoMerge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas...
Linus Torvalds [Wed, 23 Jan 2013 21:28:17 +0000 (13:28 -0800)]
Merge tag 'arm64-fixes' of git://git./linux/kernel/git/cmarinas/linux-aarch64

Pull arm64 fixes from Catalin Marinas:
 - ELF coredump fix (more registers dumped than what user space expects)
 - SUBARCH name generation (s/aarch64/arm64/)

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
  arm64: makefile: fix uname munging when setting ARCH on native machine
  arm64: elf: fix core dumping to match what glibc expects

11 years agoUSB: EHCI: fix build error in ehci-mxc
Alan Stern [Wed, 23 Jan 2013 18:26:15 +0000 (13:26 -0500)]
USB: EHCI: fix build error in ehci-mxc

This patch (as1643b) fixes a build error in ehci-hcd when compiling for
ARM with allmodconfig:

drivers/usb/host/ehci-hcd.c:1285:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]
drivers/usb/host/ehci-hcd.c:1255:0: note: this is the location of the previous definition
drivers/usb/host/ehci-mxc.c:280:31: warning: 'ehci_mxc_driver' defined but not used [-Wunused-variable]
drivers/usb/host/ehci-hcd.c:1285:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]
drivers/usb/host/ehci-hcd.c:1255:0: note: this is the location of the previous definition

The fix is to convert ehci-mxc over to the new "ehci-hcd is a library"
scheme so that it can coexist peacefully with the ehci-platform
driver.  As part of the conversion the ehci_mxc_priv data structure,
which was allocated dynamically, is now placed where it belongs: in
the private area at the end of struct ehci_hcd.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoMerge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Wed, 23 Jan 2013 17:42:46 +0000 (09:42 -0800)]
Merge tag 'sound-3.8' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Only a few small HD-audio fixes:
   - Addition of new Conexant codec IDs
   - Two one-liners to add fixups for Realtek codecs
   - A last-minute regression fix for auto-mute with power-saving mode
     (regressed since 3.8-rc1)"

* tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Fix inconsistent pin states after resume
  ALSA: hda - Add Conexant CX20755/20756/20757 codec IDs
  ALSA: hda - Add fixup for Acer AO725 laptop
  ALSA: hda - Fix mute led for another HP machine

11 years agoMAINTAINERS: remove me
Alan Cox [Wed, 23 Jan 2013 14:38:16 +0000 (14:38 +0000)]
MAINTAINERS: remove me

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoALSA: hda - Fix inconsistent pin states after resume
Takashi Iwai [Wed, 23 Jan 2013 14:58:40 +0000 (15:58 +0100)]
ALSA: hda - Fix inconsistent pin states after resume

The commit [26a6cb6c: ALSA: hda - Implement a poll loop for jacks as a
module parameter] introduced the polling jack detection code, but it
also moved the call of snd_hda_jack_set_dirty_all() in the resume path
after resume/init ops call.  This caused a regression when the jack
state has been changed during power-down (e.g. in the power save
mode).  Since the driver doesn't probe the new jack state but keeps
using the cached value due to no dirty flag, the pin state remains
also as if the jack is still plugged.

The fix is simply moving snd_hda_jack_set_dirty_all() to the original
position.

Reported-by: Manolo Díaz <diaz.manolo@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoARM: at91/dts: correct comment in at91sam9x5.dtsi for mii
Douglas Gilbert [Wed, 23 Jan 2013 08:50:02 +0000 (09:50 +0100)]
ARM: at91/dts: correct comment in at91sam9x5.dtsi for mii

Concerning pinctrl_macb0_rmii_mii, values were okay, but not comments.

Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
11 years agoARM: at91/at91_dt_defconfig: add at91sam9n12 SoC to DT defconfig
Nicolas Ferre [Wed, 23 Jan 2013 09:06:46 +0000 (10:06 +0100)]
ARM: at91/at91_dt_defconfig: add at91sam9n12 SoC to DT defconfig

Reported-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
11 years agoARM: at91/at91_dt_defconfig: remove memory specification to cmdline
Nicolas Ferre [Wed, 23 Jan 2013 09:03:23 +0000 (10:03 +0100)]
ARM: at91/at91_dt_defconfig: remove memory specification to cmdline

No need for this cmdline option as we are using DT.
Moreover this defconfig is targeted to multiple SoC/boards: this option
was nonsense.

Reported-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
11 years agoARM: at91/dts: add macb mii pinctrl config for kizbox
Boris BREZILLON [Thu, 13 Dec 2012 14:03:08 +0000 (14:03 +0000)]
ARM: at91/dts: add macb mii pinctrl config for kizbox

This patch overrides default macb pinctrl config defined in
at91sam9260.dtsi (pinctrl_macb_rmii) with kizbox board config
(pinctrl_macb_rmii + pinctrl_macb_rmii_mii_alt).

Signed-off-by: Boris BREZILLON <linux-arm@overkiz.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
11 years agoARM: at91: rm9200: remake the BGA as default version
Jean-Christophe PLAGNIOL-VILLARD [Sun, 23 Dec 2012 18:07:49 +0000 (18:07 +0000)]
ARM: at91: rm9200: remake the BGA as default version

Make BGA as the default version as we are supposed to just have
to specify when we use the PQFP version.

Issue was existing since commit:
3e90772 (ARM: at91: fix at91rm9200 soc subtype handling).

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: stable <stable@vger.kernel.org> [v3.3]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
11 years agoARM: at91: fix gpios on i2c-gpio for RM9200 DT
Joachim Eastwood [Tue, 4 Dec 2012 18:10:56 +0000 (18:10 +0000)]
ARM: at91: fix gpios on i2c-gpio for RM9200 DT

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
11 years agoARM: at91/at91sam9x5 DTS: add SCK USART pins
Richard Genoud [Fri, 18 Jan 2013 16:42:28 +0000 (16:42 +0000)]
ARM: at91/at91sam9x5 DTS: add SCK USART pins

The SCK pins where missing in usarts pinctrl.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
11 years agoARM: at91/at91sam9x5 DTS: correct wrong PIO BANK values on u(s)arts
Richard Genoud [Fri, 18 Jan 2013 16:41:21 +0000 (16:41 +0000)]
ARM: at91/at91sam9x5 DTS: correct wrong PIO BANK values on u(s)arts

The PIN_BANK 3 is for PDxx pins, not PCxx pins.
And PIN_BANK 1 is for PBxx, not PIN_BANK 0.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
11 years agoARM: at91/at91-pinctrl documentation: fix typo and add some details
Richard Genoud [Fri, 18 Jan 2013 16:38:43 +0000 (16:38 +0000)]
ARM: at91/at91-pinctrl documentation: fix typo and add some details

The relation between PIN_BANK numbers and pio letters wasn't made very
clear.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
11 years agofs/cifs/cifs_dfs_ref.c: fix potential memory leakage
Cong Ding [Wed, 23 Jan 2013 00:20:58 +0000 (19:20 -0500)]
fs/cifs/cifs_dfs_ref.c: fix potential memory leakage

When it goes to error through line 144, the memory allocated to *devname is
not freed, and the caller doesn't free it either in line 250. So we free the
memroy of *devname in function cifs_compose_mount_options() when it goes to
error.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
CC: stable <stable@kernel.org>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
11 years agoRevert "drivers/misc/ti-st: remove gpio handling"
Luciano Coelho [Mon, 21 Jan 2013 11:12:42 +0000 (13:12 +0200)]
Revert "drivers/misc/ti-st: remove gpio handling"

This reverts commit eccf2979b2c034b516e01b8a104c3739f7ef07d1.

The reason is that it broke TI WiLink shared transport on Panda.
Also, callback functions should not be added to board files anymore,
so revert to implementing the power functions in the driver itself.

Additionally, changed a variable name ('status' to 'err') so that this
revert compiles properly.

Cc: stable <stable@vger.kernel.org> [3.7]
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>