From: Trond Myklebust Subject: nfs3_proc_write() Date: Thu, 3 Jul 2003 13:30:57 +0200 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <16132.5105.444892.610300@charged.uio.no> References: <3F040ECD.7070108@shaolinmicro.com> Reply-To: trond.myklebust@fys.uio.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from pat.uio.no ([129.240.130.16]:41091 "EHLO pat.uio.no") by vger.kernel.org with ESMTP id S265063AbTGCLRF (ORCPT ); Thu, 3 Jul 2003 07:17:05 -0400 To: David Chow In-Reply-To: <3F040ECD.7070108@shaolinmicro.com> List-Id: linux-fsdevel.vger.kernel.org > By using objdump, the exact instruction which fails in the xdr_kmap() as > the following > len = PAGE_CACHE_SIZE; > if (first_kmap) { > first_kmap = 0; > !!!! iov->iov_base = kmap(*ppage); !!!! > } else { > The exception is caused by the return page_address(page) You don't want to be writing wsize bytes unless wsize <= PAGE_SIZE. My guess is that this is why you are seeing the exception. > The reason why nfs_writepage_sync() can't be used is because the > nfs_writepage_sync() assumes page_offset(page) equals to file > offset but in a swap page this is not true. Please give some hints > what is going on or which part of code I should look for. This is not only an assumption in nfs_writepage_sync(), but is also true in the nfs*_proc_write() code. If you want file offsets that are not relative to page_offset(page), you'll have to add them as an extra argument... Cheers, Trond