aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/objlayout (follow)
AgeCommit message (Collapse)AuthorFilesLines
2011-07-15pnfs: simplify pnfs files module autoloadingJ. Bruce Fields1-0/+2
Embed the necessary alias into the module rather than waiting for someone to add it to /etc/modprobe.conf Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2011-07-15NFS: Move the pnfs write code into pnfs.cTrond Myklebust1-1/+1
...and ensure that we recoalese to take into account differences in differences in block sizes when falling back to write through the MDS. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2011-07-15NFS: Move the pnfs read code into pnfs.cTrond Myklebust1-1/+1
...and ensure that we recoalese to take into account differences in block sizes when falling back to read through the MDS. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2011-07-12NFSv4.1: Fall back to ordinary i/o through the mds if we have no layout segmentTrond Myklebust1-3/+0
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2011-07-12NFSv4.1: Add an initialisation callback for pNFSTrond Myklebust1-0/+2
Ensure that we always get a layout before setting up the i/o request. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2011-07-12NFS: Cleanup of the nfs_pageio code in preparation for a pnfs bugfixTrond Myklebust1-1/+12
We need to ensure that the layouts are set up before we can decide to coalesce requests. To do so, we want to further split up the struct nfs_pageio_descriptor operations into an initialisation callback, a coalescing test callback, and a 'do i/o' callback. This patch cleans up the existing callback methods before adding the 'initialisation' callback. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2011-06-21NFSv4.1: Fix some issues with pnfs_generic_pg_testTrond Myklebust1-0/+3
1. If the intention is to coalesce requests 'prev' and 'req' then we have to ensure at least that we have a layout starting at req_offset(prev). 2. If we're only requesting a minimal layout of length desc->pg_count, we need to test the length actually returned by the server before we allow the coalescing to occur. 3. We need to deal correctly with (pgio->lseg == NULL) 4. Fixup the test guarding the pnfs_update_layout. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2011-06-19pnfs-obj: No longer needed to take an extra ref at add_deviceBoaz Harrosh1-1/+0
Andy's last device_cache patches, already take an extra reference on the newly inserted device_id. So we can remove it from obj-io. Without this patch the device_ids are leaked. Andy's patches are not in Linus tree yet. So I'm not sure if they are scheduled for this Kernel or the next. This patch should be added as part of these. CC: Andy Adamson <andros@netapp.com> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2011-06-15NFS: (d)printks should use %zd for ssize_t argumentsDavid Howells1-1/+1
(d)printks should use %zd for ssize_t arguments not %ld, otherwise they might get a warning. I see the following with MN10300. fs/nfs/objlayout/objlayout.c: In function 'objlayout_read_done': fs/nfs/objlayout/objlayout.c:294: warning: format '%ld' expects type 'long int', but argument 3 has type 'ssize_t' Signed-off-by: David Howells <dhowells@redhat.com> cc: Trond Myklebust <Trond.Myklebust@netapp.com> cc: linux-nfs@vger.kernel.org Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2011-05-29pnfs-obj: pg_test check for max_io_sizeBoaz Harrosh1-1/+18
Implement pg_test vector to test for max IO sizes. We calculate a max_io_size member only once, and cache it in lseg so to not do so on every page insert. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> [simplify logic] Signed-off-by: Benny Halevy <bhalevy@panasas.com>
2011-05-29NFSv4.1: use pnfs_generic_pg_test directly by layout driverBenny Halevy1-13/+1
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
2011-05-29NFSv4.1: change pg_test return type to boolBenny Halevy1-4/+3
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
2011-05-29pnfs-obj: objlayout_encode_layoutcommit implementationBoaz Harrosh3-0/+61
* Define API for io-engines to report delta_space_used in IOs * Encode the osd-layout specific information of the layoutcommit XDR buffer. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
2011-05-29pnfs-obj: report errors and .encode_layoutreturn Implementation.Boaz Harrosh3-2/+297
An io_state pre-allocates an error information structure for each possible osd-device that might error during IO. When IO is done if all was well the io_state is freed. (as today). If the I/O has ended with an error, the io_state is queued on a per-layout err_list. When eventually encode_layoutreturn() is called, each error is properly encoded on the XDR buffer and only then the io_state is removed from err_list and de-allocated. It is up to the io_engine to fill in the segment that fault and the type of osd_error that occurred. By calling objlayout_io_set_result() for each failing device. In objio_osd: * Allocate io-error descriptors space as part of io_state * Use generic objlayout error reporting at end of io. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
2011-05-29pnfs: layoutret_on_setattrBenny Halevy1-0/+1
With the objects layout security model, we have object capabilities that are associated with the layout and we anticipate that the server will issue a cb_layoutrecall for any setattr that changes security related attributes (user/group/mode/acl) or truncates the file. Therefore, the layout is returned before issuing the setattr to avoid the anticipated cb_layoutrecall. Signed-off-by: Benny Halevy <bhalevy@panasas.com>
2011-05-29pnfs-obj: osd raid engine read/write implementationBoaz Harrosh3-0/+901
With the use of the in-kernel osd library. Implement read/write of data from/to osd-objects according to information specified in the objects-layout. Support for stripping over mirrors with a received stripe_unit. There are however a few constrains which are not supported: 1. Stripe Unit must be a multiple of PAGE_SIZE 2. stripe length (stripe_unit * number_of_stripes) can not be bigger then 32bit. Also support raid-groups and partial-layout. Partial-layout is when not all the groups are received on the line, addressing only a partial range of the file. TODO: Only raid0! raid 4/5/6 support will come at later stage A none supported layout will send IO through the MDS [Important fallout from the last rebase] Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> [gfp_flags] Signed-off-by: Benny Halevy <bhalevy@panasas.com>
2011-05-29pnfs-obj: define per-inode private structureBenny Halevy3-0/+46
allocate and deallocate per-inode private pnfs_layout_hdr in preparation for I/O implementation. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
2011-05-29pnfs-obj: objio_osd device information retrieval and cachingBoaz Harrosh3-0/+233
When a new layout is received in objio_alloc_lseg all device_ids referenced are retrieved. The device information is queried for from MDS and then the osd_device is looked-up from the osd-initiator library. The devices are cached in a per-mount-point list, for later use. At unmount all devices are "put" back to the library. objlayout_get_deviceinfo(), objlayout_put_deviceinfo() middleware API for retrieving device information given a device_id. TODO: The device cache can get big. Cap its size. Keep an LRU and start to return devices which were not used, when list gets to big, or when new entries allocation fail. [pnfs-obj: Bugs in new global-device-cache code] Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> [gfp_flags] [use global device cache] [use layout driver in global device cache] Signed-off-by: Benny Halevy <bhalevy@panasas.com>
2011-05-29pnfs-obj: decode layout, alloc/free lsegBoaz Harrosh4-2/+341
objlayout_alloc_lseg prepares an xdr_stream and calls the raid engins objio_alloc_lseg() to allocate a private pnfs_layout_segment. objio_osd.c::objio_alloc_lseg() uses passed xdr_stream to decode and store the layout_segment information in an objio_segment struct, using the pnfs_osd_xdr.h API for the actual parsing the layout xdr. objlayout_free_lseg calls objio_free_lseg() to free the allocated space. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> [gfp_flags] [removed "extern" from function definitions] Signed-off-by: Benny Halevy <bhalevy@panasas.com>
2011-05-29pnfs-obj: pnfs_osd XDR client implementationBoaz Harrosh2-1/+413
* Add the fs/nfs/objlayout/pnfs_osd_xdr_cli.c file, which will include the XDR encode/decode implementations for the pNFS client objlayout driver. [Wrong type in comments] Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
2011-05-29pnfs-obj: objlayoutdriver module skeletonBenny Halevy2-0/+81
* Define the PNFS_OBJLAYOUT Kconfig option in the nfs master Kconfig file. * Add the objlayout driver to the Kernel's Kbuild system. * Add the fs/nfs/objlayout/Kbuild file for building the objlayoutdriver.ko driver * Define fs/nfs/objlayout/objio_osd.c, register the driver on module initialization and unregister on exit. [pnfs-obj: remove of CONFIG_PNFS fallout] Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> [added "unsure" clause] [depend on NFS_V4_1] Signed-off-by: Benny Halevy <bhalevy@panasas.com>