Revert "LU-2182 utils: new llapi_layout API implementation"

This reverts commit da2e9db4c3ab4c7df84a1043c0ac2d9836739e7b.
LU-2182 utils: new llapi_layout API implementation

Add a new set of llapi routines for interacting with file layouts that
hide the details of the wire-protocol data structures from the user.
Define an opaque data type lustre_layout_t to abstract the layout of a
lustre file and generic accessor functions to read and write it.  The
following functions are added the liblustreapi public interface:

  llapi_layout_alloc - allocate a new layout
  llapi_layout_file_create - create new file with given layout
  llapi_layout_free - free memory allocated for a layout
  llapi_layout_lookup_bypath - get file layout given a path
  llapi_layout_lookup_byfd - get file layout given a file descriptor
  llapi_layout_lookup_byfid - get file layout given a file identifier
  llapi_layout_obj_id - get object id associated with a stripe
  llapi_layout_ost_index - get OST index associated with a stripe
  llapi_layout_ost_index_set - set OST index assoicated with a stripe
  llapi_layout_pattern - get RAID pattern of a layout
  llapi_layout_pattern_set - set RAID pattern of a layout
  llapi_layout_pool_name - get pool name of a layout
  llapi_layout_pool_name_set - set pool name of a layout
  llapi_layout_stripe_count - get stripe count of a layout
  llapi_layout_stripe_count_set - set stripe count of a layout
  llapi_layout_stripe_size - get stripe size of a layout
  llapi_layout_stripe_size_set - set stripe size of a layout

The layouts are read and written using fgetxattr() and fsetxattr()
instead of ioctl() to make it easier for architectures like Blue Gene
to function-ship the system calls.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I35fb51055b6438ef3090f43c28a4083a66eaa907
Patch-Set: 10
LU-2139 osc: s/obd_max_pinned_pages/obd_max_dirty_pages/

The other unstable pages patches were updated, but the:

  LU-2139 osc: Use SOFT_SYNC to urge server commit

commit still references obd_max_pinned_pages which was
an abandonded change.

Change-Id: Ia86d3bf467c8a3a489648f82b60927de2634fe29
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
LU-3029 osd-ldiskfs: clear old FMODE_32BITHASH for readdir

On service side, the RPC service thread's "osd_thread_info" will be
reused without totally reset when switch from one RPC processing to
another RPC processing.

Some old client may not claim "OBD_CONNECT_64BITHASH" when connect
to the MDS, then it will be regarded as 32-bit client. For readdir
RPC from such old client, the MDS will use 32-bit dirhash, the RPC
service thread's "osd_thread_info::oti_it_ea::oie_file::f_mode" is
set as "FMODE_32BITHASH", which will not be dropped until restart.

If some RPC service threads (for readdir) are "FMODE_32BITHASH",
but some NOT, then for new client, which support 64-bit dirhash,
it may get trouble when traverses large directroy as following:

1) The first readdir RPC is served by the RPC service thread1,
   which is marked as "FMODE_32BITHASH" because it ever served
   readdir RPC from old client. So the thread1 still generates
   32-bit dirhash (major hash only) for the new client readdir.

2) The new client triggers another readdir RPC for the same dir
   with the 32-bit dirhash as cookie, which was returned by the
   thread1.

3) This time, the readdir RPC is served by another RPC service
   thread2, which is NOT marked as "FMODE_32BITHASH". Then the
   thread2 explains the readdir cookie as 64-bit dirhash, It's
   wrong. So the thread2 can NOT locate the position correctly.

So we need to clear some fields in "osd_thread_info" to avoid
to be reused when switch from one RPC processing to another.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I3b9aaede0bccab900f1d198c7093b98f0fc48945
LU-3182 lmv: fix duplicate directory entries

lmv_readpage() fails to overwrite the ldp_hash_end and ldp_flags of
the first lu_dirpage in a CFS_PAGE with the values from the last
lu_dirpage. This causes duplicate directory entries to be returned
from readdir() for sufficiently large directories.  This is only
an issue on platforms where CFS_PAGE_SIZE > LU_PAGE_SIZE, i.e. PPC.

* Fix the regression introduced in commit 5e91e5b, which was the
  apparently accidental removal of these lines from lmv_readpage():

-                        hash_end = dp->ldp_hash_end;
-                        flags = dp->ldp_flags;

* Refactor the lmv_readpage() function and add some comments.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I04e9a98b90216a7da7ce9d9325080d6b6c4010c7
Patch-Set: 5
Revert "LU-3103 Fix function declared static and EXPORT_SYMBOL"

This reverts commit 59dad77e2142645f16f097fdcb5477aafd2b29a1.

We went with another fix for this.  Revert will remind me to drop
the commit in the next rebase.