Re: nfs_page flags question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 14, 2009 at 2:20 AM, Venkatesh Srinivas <me@xxxxxxxxxxx> wrote:
> Hi,
>
> We are currently trying to trace down an NFS fault in our environment,
> where we trip the BUG() at fs/nfs/write.c:252. When we trip that bug,
> both PG_CLEAN and PG_NEED_COMMIT are set in the nfs_page's flags. That
> seems bad (from their names), but I haven't been able to find a good
> description of what the nfs_page flags mean.
>
> The flags here are the ones at include/linux/nfs_page.h:30. Do any of
> you know what they imply? Any resource that'd talk more about them?
>
> Thanks,
> -- vs
>

take a look at the context on how it is used:

in fs/nfs/write.c:

1070 static void nfs_writeback_release_full(void *calldata)
1071 {
1072         struct nfs_write_data   *data = calldata;
1073         int status = data->task.tk_status;
1074
1075         /* Update attributes as result of writeback. */
1076         while (!list_empty(&data->pages)) {

<snip>

1095
1096                 if (nfs_write_need_commit(data)) {
1097                         memcpy(&req->wb_verf, &data->verf,
sizeof(req->wb_verf));
1098                         nfs_mark_request_commit(req);
1099                         nfs_end_page_writeback(page);
1100                         dprintk(" marked for commit\n");
1101                         goto next;
1102                 }
1103                 dprintk(" OK\n");
1104 remove_request:

and nfs_mark_request_commit() simply mark the page as PG_CLEAN:

 415 static void
 416 nfs_mark_request_commit(struct nfs_page *req)
 417 {
 418         struct inode *inode = req->wb_context->path.dentry->d_inode;
 419         struct nfs_inode *nfsi = NFS_I(inode);
 420
 421         spin_lock(&inode->i_lock);
 422         set_bit(PG_CLEAN, &(req)->wb_flags);
 423         radix_tree_tag_set(&nfsi->nfs_page_tree,
 424                         req->wb_index,
 425                         NFS_PAGE_TAG_COMMIT);
 426         spin_unlock(&inode->i_lock);

so we know that first writeback occurred, then if successful, page is
marked as clean and committed.

same goes for all other symbols.

-- 
Regards,
Peter Teoh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux