xfs
[Top] [All Lists]

Re: [RFC PATCH] xfs: enables file data inlining in inodes

To: Carlos Maiolino <cmaiolino@xxxxxxxxxx>
Subject: Re: [RFC PATCH] xfs: enables file data inlining in inodes
From: Raghavendra D Prabhu <raghu.prabhu13@xxxxxxxxx>
Date: Fri, 12 Oct 2012 18:00:14 +0530
Cc: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :x-operating-system:x-editor:user-agent; bh=zY76Z5XRAgUTCCpbBuflOQphaDXm1+0yf4wLqY0Na3A=; b=lY3lMXmRtgHUdsUqEnAjLAcvJSrIS6SqstSLB9ibHDz5O90kWSwchzZtKd+bnvpzy8 +l3gEx3RhogbLWWFOUZhmQ2evI9gEZBIxrrByCzT6qTcmGz71ie46mPI8Lo6QwA+6sb9 7Mg/8OsAGGdrH69xLZySpc0byaPdZQnt0Bs4A3vq1ejRRL9r8Rr1K8rojPuao93m6p6A Tm5+aaFnG4Fe34BrhWSF/58Gu4S/cuS0JDn1wCFdLweVFcNpCcy7yjGUGJ9ahHxfoAkL mZtTTdzZlY79R4lWf8cEuv1DEoAc2SBBmDkm44/LUBGpmbgrzUxRpCQU+//iH6dP8trf 7eNg==
In-reply-to: <1349985158-9952-1-git-send-email-cmaiolino@xxxxxxxxxx>
Mail-followup-to: Carlos Maiolino <cmaiolino@xxxxxxxxxx>, xfs@xxxxxxxxxxx
References: <1349985158-9952-1-git-send-email-cmaiolino@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2011-07-01)
Hi,


* On Thu, Oct 11, 2012 at 04:52:38PM -0300, Carlos Maiolino 
<cmaiolino@xxxxxxxxxx> wrote:
Hi,

this is a first RFC patch of my work on data inlining, i.e. use the xfs inode's
literal area to store user's data.

This first patch just cares about write and read new files into inode's literal
area, it does not make any conversion from inline to extent or vice-versa.

The idea to send this patch to list is just to get comments about this first
work and see if anybody has some ideas/suggestions about it, mainly related
with page cache and journal handling, since it's the first time I deal with
journal and page cache handling, I'm not pretty sure if I did things right
or not.

Every comment is very appreciated.

Thanks
---
fs/xfs/xfs_aops.c  | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++---
+       if (ip->i_d.di_format == XFS_DINODE_FMT_LOCAL) {
+               struct page     *page = list_first_entry(pages, struct page, 
lru);
+
+               ASSERT(i_size_read(VFS_I(ip) <= PAGE_CACHE_SIZE));

Looks good.

But, I guess should be --- ASSERT(i_size_read(VFS_I(ip)) <= PAGE_CACHE_SIZE);  
here?

+
+               list_del(&page->lru);
+               if(!(add_to_page_cache_lru(page, mapping,
+                                           page->index, GFP_KERNEL)))
+                       return xfs_inline_read(ip, page, page->mapping);
+
+               page_cache_release(page);
+               return 0;
+       } else {
+               return mpage_readpages(mapping, pages, nr_pages, 
xfs_get_blocks);
+       }
}

const struct address_space_operations xfs_address_space_operations = {
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 2778258..5e56e5c 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -287,18 +287,6 @@ xfs_iformat(
        case S_IFDIR:
--
1.7.11.7

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




Regards,
--
Raghavendra Prabhu
GPG Id : 0xD72BE977
Fingerprint: B93F EBCB 8E05 7039 CD3C A4B8 A616 DCA1 D72B E977
www: wnohang.net

Attachment: pgpy5DLThCz0U.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>