summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* vfs: Remove generic_osync_inode() and sync_page_range{_nolock}()Jan Kara2009-09-144-127/+0
| | | | | | Remove these three functions since nobody uses them anymore. Signed-off-by: Jan Kara <jack@suse.cz>
* fat: Opencode sync_page_range_nolock()Jan Kara2009-09-142-4/+22
| | | | | | | | | | | | fat_cont_expand() is the only user of sync_page_range_nolock(). It's also the only user of generic_osync_inode() which does not have a file open. So opencode needed actions for FAT so that we can convert generic_osync_inode() to a standard syncing path. Update a comment about generic_osync_inode(). CC: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Jan Kara <jack@suse.cz>
* pohmelfs: Use new syncing helperJan Kara2009-09-141-2/+2
| | | | | | | Use new generic_write_sync() helper instead of sync_page_range(). Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Jan Kara <jack@suse.cz>
* xfs: Convert sync_page_range() to simple filemap_write_and_wait_range()Jan Kara2009-09-141-1/+2
| | | | | | | | | | | Christoph Hellwig says that it is enough for XFS to call filemap_write_and_wait_range() instead of sync_page_range() because we do all the metadata syncing when forcing the log. CC: Felix Blyakher <felixb@sgi.com> CC: xfs@oss.sgi.com CC: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
* ocfs2: Update syncing after splicing to match generic versionJan Kara2009-09-141-21/+6
| | | | | | | | | | | | Update ocfs2 specific splicing code to use generic syncing helper. The sync now does not happen under rw_lock because generic_write_sync() acquires i_mutex which ranks above rw_lock. That should not matter because standard fsync path does not hold it either. Acked-by: Joel Becker <Joel.Becker@oracle.com> Acked-by: Mark Fasheh <mfasheh@suse.com> CC: ocfs2-devel@oss.oracle.com Signed-off-by: Jan Kara <jack@suse.cz>
* ntfs: Use new syncing helpers and update commentsJan Kara2009-09-142-19/+10
| | | | | | | | | | Use new syncing helpers in .write and .aio_write functions. Also remove superfluous syncing in ntfs_file_buffered_write() and update comments about generic_osync_inode(). CC: Anton Altaparmakov <aia21@cantab.net> CC: linux-ntfs-dev@lists.sourceforge.net Signed-off-by: Jan Kara <jack@suse.cz>
* ext4: Remove syncing logic from ext4_file_writeJan Kara2009-09-141-51/+2
| | | | | | | | | The syncing is now properly handled by generic_file_aio_write() so no special ext4 code is needed. CC: linux-ext4@vger.kernel.org CC: tytso@mit.edu Signed-off-by: Jan Kara <jack@suse.cz>
* ext3: Remove syncing logic from ext3_file_writeJan Kara2009-09-141-60/+1
| | | | | | | | Syncing is now properly done by generic_file_aio_write() so no special logic is needed in ext3. CC: linux-ext4@vger.kernel.org Signed-off-by: Jan Kara <jack@suse.cz>
* ext2: Update comment about generic_osync_inodeJan Kara2009-09-141-1/+1
| | | | | | | We rely on generic_write_sync() now. CC: linux-ext4@vger.kernel.org Signed-off-by: Jan Kara <jack@suse.cz>
* vfs: Introduce new helpers for syncing after writing to O_SYNC file or ↵Jan Kara2009-09-144-30/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | IS_SYNC inode Introduce new function for generic inode syncing (vfs_fsync_range) and use it from fsync() path. Introduce also new helper for syncing after a sync write (generic_write_sync) using the generic function. Use these new helpers for syncing from generic VFS functions. This makes O_SYNC writes to block devices acquire i_mutex for syncing. If we really care about this, we can make block_fsync() drop the i_mutex and reacquire it before it returns. CC: Evgeniy Polyakov <zbr@ioremap.net> CC: ocfs2-devel@oss.oracle.com CC: Joel Becker <joel.becker@oracle.com> CC: Felix Blyakher <felixb@sgi.com> CC: xfs@oss.sgi.com CC: Anton Altaparmakov <aia21@cantab.net> CC: linux-ntfs-dev@lists.sourceforge.net CC: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> CC: linux-ext4@vger.kernel.org CC: tytso@mit.edu Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
* vfs: Rename generic_file_aio_write_nolockChristoph Hellwig2009-09-144-43/+33
| | | | | | | | | | generic_file_aio_write_nolock() is now used only by block devices and raw character device. Filesystems should use __generic_file_aio_write() in case generic_file_aio_write() doesn't suit them. So rename the function to blkdev_aio_write() and move it to fs/blockdev.c. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
* ocfs2: Use __generic_file_aio_write instead of generic_file_aio_write_nolockJan Kara2009-09-141-10/+12
| | | | | | | | | | | Use the new helper. We have to submit data pages ourselves in case of O_SYNC write because __generic_file_aio_write does not do it for us. OCFS2 developpers might think about moving the sync out of i_mutex which seems to be easily possible but that's out of scope of this patch. CC: ocfs2-devel@oss.oracle.com Acked-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Jan Kara <jack@suse.cz>
* pohmelfs: Use __generic_file_aio_write instead of generic_file_aio_write_nolockJan Kara2009-09-141-1/+1
| | | | | | | | Use new helper __generic_file_aio_write(). Since the fs takes care of syncing by itself afterwards, there are no more changes needed. CC: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Jan Kara <jack@suse.cz>
* vfs: Remove syncing from generic_file_direct_write() and ↵Jan Kara2009-09-141-29/+6
| | | | | | | | | | | | | | | | | | | | generic_file_buffered_write() generic_file_direct_write() and generic_file_buffered_write() called generic_osync_inode() if it was called on O_SYNC file or IS_SYNC inode. But this is superfluous since generic_file_aio_write() does the syncing as well. Also XFS and OCFS2 which call these functions directly handle syncing themselves. So let's have a single place where syncing happens: generic_file_aio_write(). We slightly change the behavior by syncing only the range of file to which the write happened for buffered writes but that should be all that is required. CC: ocfs2-devel@oss.oracle.com CC: Joel Becker <joel.becker@oracle.com> CC: Felix Blyakher <felixb@sgi.com> CC: xfs@oss.sgi.com Signed-off-by: Jan Kara <jack@suse.cz>
* vfs: Export __generic_file_aio_write() and add some commentsJan Kara2009-09-142-7/+52
| | | | | | | | | | | | Rename __generic_file_aio_write_nolock() to __generic_file_aio_write(), add comments to write helpers explaining how they should be used and export __generic_file_aio_write() since it will be used by some filesystems. CC: ocfs2-devel@oss.oracle.com CC: Joel Becker <joel.becker@oracle.com> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
* vfs: Introduce filemap_fdatawait_rangeJan Kara2009-09-142-0/+22
| | | | | | | | This simple helper saves some filesystems conversion from byte offset to page numbers and also makes the fdata* interface more complete. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
* Merge git://git.linux-nfs.org/projects/trondmy/nfs-2.6Linus Torvalds2009-09-1148-1805/+4064
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (87 commits) NFSv4: Disallow 'mount -t nfs4 -overs=2' and 'mount -t nfs4 -overs=3' NFS: Allow the "nfs" file system type to support NFSv4 NFS: Move details of nfs4_get_sb() to a helper NFS: Refactor NFSv4 text-based mount option validation NFS: Mount option parser should detect missing "port=" NFS: out of date comment regarding O_EXCL above nfs3_proc_create() NFS: Handle a zero-length auth flavor list SUNRPC: Ensure that sunrpc gets initialised before nfs, lockd, etc... nfs: fix compile error in rpc_pipefs.h nfs: Remove reference to generic_osync_inode from a comment SUNRPC: cache must take a reference to the cache detail's module on open() NFS: Use the DNS resolver in the mount code. NFS: Add a dns resolver for use with NFSv4 referrals and migration SUNRPC: Fix a typo in cache_pipefs_files nfs: nfs4xdr: optimize low level decoding nfs: nfs4xdr: get rid of READ_BUF nfs: nfs4xdr: simplify decode_exchange_id by reusing decode_opaque_inline nfs: nfs4xdr: get rid of COPYMEM nfs: nfs4xdr: introduce decode_sessionid helper nfs: nfs4xdr: introduce decode_verifier helper ...
| * Merge branch 'nfs-for-2.6.32'Trond Myklebust2009-09-1148-1805/+4064
| |\
| | * NFSv4: Disallow 'mount -t nfs4 -overs=2' and 'mount -t nfs4 -overs=3'Trond Myklebust2009-09-081-0/+6
| | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * NFS: Allow the "nfs" file system type to support NFSv4Chuck Lever2009-09-083-2/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When mounting an "nfs" type file system, recognize "v4," "vers=4," or "nfsvers=4" mount options, and convert the file system to "nfs4" under the covers. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> [trondmy: fixed up binary mount code so it sets the 'version' field too] Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * NFS: Move details of nfs4_get_sb() to a helperChuck Lever2009-09-081-13/+31
| | | | | | | | | | | | | | | | | | | | | | | | Clean up: Refactor nfs4_get_sb() to allow its guts to be invoked by nfs_get_sb(). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * NFS: Refactor NFSv4 text-based mount option validationChuck Lever2009-09-081-28/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up: Refactor the part of nfs4_validate_mount_options() that handles text-based options, so we can call it from the NFSv2/v3 option validation function. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * NFS: Mount option parser should detect missing "port="Chuck Lever2009-09-082-28/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The meaning of not specifying the "port=" mount option is different for "-t nfs" and "-t nfs4" mounts. The default port value for NFSv2/v3 mounts is 0, but the default for NFSv4 mounts is 2049. To support "-t nfs -o vers=4", the mount option parser must detect when "port=" is missing so that the correct default port value can be set depending on which NFS version is requested. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * NFS: out of date comment regarding O_EXCL above nfs3_proc_create()Harshula Jayasuriya2009-09-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi Trond, Recently we were observing the behaviour difference between a 2.4.x and 2.6.x kernel with respect to O_EXCL. A comment from 2.4.x era, "For now, we don't implement O_EXCL." seems inaccurate in TOT. If so, here's a patch to remove the comment. This patch is against: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Signed-off-by: Harshula Jayasuriya <harshula@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * NFS: Handle a zero-length auth flavor listChuck Lever2009-08-231-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some releases of Linux rpc.mountd (nfs-utils 1.1.4 and later) return an empty auth flavor list if no sec= was specified for the export. This is notably broken server behavior. The new auth flavor list checking added in a recent commit rejects this case. The OpenSolaris client does too. The broken mountd implementation is already widely deployed. To avoid a behavioral regression, the kernel's mount client skips flavor checking (ie reverts to the pre-2.6.32 behavior) if mountd returns an empty flavor list. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * SUNRPC: Ensure that sunrpc gets initialised before nfs, lockd, etc...Trond Myklebust2009-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | We can oops if rpc_pipefs isn't properly initialised before we start to set up objects that depend upon it. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs: fix compile error in rpc_pipefs.hJ. Bruce Fields2009-08-201-0/+2
| | | | | | | | | | | | | | | | | | | | | This include is needed for the definition of delayed_work. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs: Remove reference to generic_osync_inode from a commentJan Kara2009-08-191-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | generic_file_direct_write() no longer calls generic_osync_inode() so remove the comment. CC: linux-nfs@vger.kernel.org CC: Neil Brown <neilb@suse.de> CC: "J. Bruce Fields" <bfields@fieldses.org> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * SUNRPC: cache must take a reference to the cache detail's module on open()Trond Myklebust2009-08-191-4/+76
| | | | | | | | | | | | | | | | | | | | | Otherwise we Oops if the module containing the cache detail is removed before all cache readers have closed the file. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * NFS: Use the DNS resolver in the mount code.Trond Myklebust2009-08-191-1/+17
| | | | | | | | | | | | | | | | | | | | | In the referral code, use it to look up the new server's ip address if the fs_locations attribute contains a hostname. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * NFS: Add a dns resolver for use with NFSv4 referrals and migrationTrond Myklebust2009-08-199-1/+639
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NFSv4 and NFSv4.1 protocols both allow for the redirection of a client from one server to another in order to support filesystem migration and replication. For full protocol support, we need to add the ability to convert a DNS host name into an IP address that we can feed to the RPC client. We'll reuse the sunrpc cache, now that it has been converted to work with rpc_pipefs. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * SUNRPC: Fix a typo in cache_pipefs_filesTrond Myklebust2009-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | We want the channel to be a regular file, so that we don't need to supply rpc_pipe_ops. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * Merge branch 'nfsv4_xdr_cleanups-for-2.6.32' into nfs-for-2.6.32Trond Myklebust2009-08-19158-1436/+3577
| | |\ | | | | | | | | | | | | | | | | Conflicts: fs/nfs/nfs4xdr.c
| | | * nfs: nfs4xdr: optimize low level decodingBenny Halevy2009-08-141-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | do not increment decoding ptr if not needed. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | | * nfs: nfs4xdr: get rid of READ_BUFBenny Halevy2009-08-141-96/+379
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use xdr_inline_decode instead. Open code debug printout and error return. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | | * nfs: nfs4xdr: simplify decode_exchange_id by reusing decode_opaque_inlineBenny Halevy2009-08-141-9/+10
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | | * nfs: nfs4xdr: get rid of COPYMEMBenny Halevy2009-08-141-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Just directly call memcpy. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | | * nfs: nfs4xdr: introduce decode_sessionid helperBenny Halevy2009-08-141-10/+15
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | | * nfs: nfs4xdr: introduce decode_verifier helperBenny Halevy2009-08-141-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Benny Halevy <bhalevy@panasas.com> [Trond: Fixed up an 'uninitialised variable' issue in decode_readdir] Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | | * nfs: nfs4xdr: introduce decode_opaque_fixed and decode_stateid helpersBenny Halevy2009-08-141-31/+40
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | | * nfs: nfs4xdr: introduce print_overflow_msgBenny Halevy2009-08-141-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Part fo the nfs4xdr cleanup. READ_BUF will go away. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | | * nfs: nfs4xdr: get rid of READTIMEBenny Halevy2009-08-141-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It has no users. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | | * nfs: nfs4xdr: get rid of READ64Benny Halevy2009-08-141-29/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | s/READ64\(\*(.*)\)/p = xdr_decode_hyper(p, \1)/ s/READ64\((.*)\)/p = xdr_decode_hyper(p, &\1)/ Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | | * nfs: nfs4xdr: get rid of READ32Benny Halevy2009-08-141-73/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | s/READ32\((.*)\)/\1 = be32_to_cpup(p++)/ Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | | * nfs: nfs4xdr: merge xdr_encode_int+xdr_encode_opaque_fixed into ↵Benny Halevy2009-08-141-28/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xdr_encode_opaque use encode_string where appropriate. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | | * nfs: nfs4xdr: optimize low level encodingBenny Halevy2009-08-141-64/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | do not increment encoding ptr if not needed. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | | * nfs: nfs4xdr: change RESERVE_SPACE macro into a static helperBenny Halevy2009-08-141-73/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to open code and expose the result pointer assignment. Alternatively, we can open code the call to xdr_reserve_space and do the BUG_ON an the error case at the call site. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | | * nfs: nfs4xdr: encode_compound_hdr does not have to round up reserved bytesBenny Halevy2009-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is already done by xdr_reserve_space and since encode_compound_hdr is adding a byte count to "12" which is already word aligned, the xdr level rounding will work just as well. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | | * nfs: nfs4xdr: optimize RESERVE_SPACE in encode_create_session and ↵Benny Halevy2009-08-141-17/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | encode_sequence Coalesce multilpe constant RESERVE_SPACEs into one Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | | * nfs: nfs4xdr: get rid of WRITEMEMBenny Halevy2009-08-141-36/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | s/WRITEMEM(/p = xdr_encode_opaque_fixed(p, / Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
OpenPOWER on IntegriCloud