linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: Jeff Garzik <jeff@garzik.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	open-osd <osd-dev@open-osd.org>,
	Evgeniy Polyakov <zbr@iorema
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Subject: Re: [PATCHSET 0/8 version 4] exofs for kernel 2.6.30
Date: Mon, 23 Mar 2009 15:06:33 +0200	[thread overview]
Message-ID: <49C78959.4040109@panasas.com> (raw)
In-Reply-To: <49C1331D.1080805@panasas.com>

[-- Attachment #1: Type: text/plain, Size: 2629 bytes --]

Boaz Harrosh wrote:
> What's new since last iteration:
> 
> * I completely re-wrote the [PATCH 4/8] exofs: address_space_operations
>   in which we actually write/read to/from osd-storage. The difference is
>   that now we try to accumulate as many contiguous pages as possible and
>   send them as one large request. As opposed to writing each page at a
>   time, in the previous patchset.
> 
> * [PATCH 5/8] exofs: dir_inode and directory operations received lots
>   of love thanks to Evgeniy Polyakov's grate comments.
> 
> exofs is a file system that uses an OSD device as it's back store.
> 
> OSD is a new T10 command set that views storage devices not as a large/flat
> array of sectors but as a container of objects, each having a length, quota,
> time attributes and more. Each object is addressed by a 64bit ID, and is
> contained in a 64bit ID partition. Each object has associated attributes
> attached to it, which are integral part of the object and provide metadata about
> the object. The standard defines some common obligatory attributes, but user
> attributes can be added as needed.
> 
> Here is the list of patches
> [PATCH 1/8] exofs: Kbuild, Headers and osd utils

   I have updated this patch on git.open-osd.org
   Kbuild fallout
 
> [PATCH 2/8] exofs: file and file_inode operations
> [PATCH 3/8] exofs: symlink_inode and fast_symlink_inode operations
> [PATCH 4/8] exofs: address_space_operations

  I have posted a new version of this patch

> [PATCH 5/8] exofs: dir_inode and directory operations
> [PATCH 6/8] exofs: super_operations and file_system_type

  Minor clean-up to this patch 
  (moved local structures to c file from header, remove unused function)

> [PATCH 7/8] exofs: Documentation
> [PATCH 8/8] fs: Add exofs to Kernel build
> 

Revised patchset can be found on link below
Attached the total diff from last HEAD

> This patchset is also available on:
>   git-clone git://git.open-osd.org/linux-open-osd.git linux-next
> or on the web at:
>   http://git.open-osd.org/gitweb.cgi?p=linux-open-osd.git;a=shortlog;h=refs/heads/linux-next
> 
> (Above tree is based on Linus v2.6.29-rc8-212-g8144737)
> 
> If anyone wants to actually run this code and test it
> then please start reading at:
>     http://open-osd.org
> You will need to checkout the out-of-tree git (below) for the user-mode utilities.
> Also the exofs.txt file in patch 7/8 should help
> 
> If you want to review the user-mode library and supporting plumbings,
>   git-clone git://git.open-osd.org/open-osd.git
> or on the web at:
>   http://git.open-osd.org/gitweb.cgi?p=open-osd.git;a=summary
> 
> Boaz
> 

Thanks
Boaz

[-- Attachment #2: exofs-ver5-to-ver4.diff --]
[-- Type: text/plain, Size: 6770 bytes --]

git diff --stat -p 690dd5e9e739cb0c66a792c5d7949f6e97113427..linux-next -- fs/exofs/
 fs/exofs/Kbuild  |    2 +-
 fs/exofs/exofs.h |   17 -----------------
 fs/exofs/file.c  |    4 ++++
 fs/exofs/inode.c |   45 ++++++++++++++++++++++-----------------------
 fs/exofs/super.c |    9 +++++++++
 5 files changed, 36 insertions(+), 41 deletions(-)

diff --git a/fs/exofs/Kbuild b/fs/exofs/Kbuild
index 592f40d..8c5253e 100644
--- a/fs/exofs/Kbuild
+++ b/fs/exofs/Kbuild
@@ -22,7 +22,7 @@ ccflags-y += -DCONFIG_EXOFS_FS -DCONFIG_EXOFS_FS_MODULE
 # if we are built out-of-tree and the hosting kernel has OSD headers
 # then "ccflags-y +=" will not pick the out-off-tree headers. Only by doing
 # this it will work. This might break in future kernels
-KBUILD_CPPFLAGS := -I$(OSD_INC) $(KBUILD_CPPFLAGS)
+LINUXINCLUDE := -I$(OSD_INC) $(LINUXINCLUDE)
 
 endif
 
diff --git a/fs/exofs/exofs.h b/fs/exofs/exofs.h
index 76155d7..d54753d 100644
--- a/fs/exofs/exofs.h
+++ b/fs/exofs/exofs.h
@@ -54,15 +54,6 @@
 #define _LLU(x) (unsigned long long)(x)
 
 /*
- * struct to hold what we get from mount options
- */
-struct exofs_mountopt {
-	const char *dev_name;
-	uint64_t pid;
-	int timeout;
-};
-
-/*
  * our extension to the in-memory superblock
  */
 struct exofs_sb_info {
@@ -134,14 +125,6 @@ static inline struct exofs_i_info *exofs_i(struct inode *inode)
 }
 
 /*
- * ugly struct so that we can pass two arguments to update_inode's callback
- */
-struct updatei_args {
-	struct exofs_sb_info	*sbi;
-	struct exofs_fcb	fcb;
-};
-
-/*
  * Maximum count of links to a file
  */
 #define EXOFS_LINK_MAX           32000
diff --git a/fs/exofs/file.c b/fs/exofs/file.c
index 4738c3f..2712f68 100644
--- a/fs/exofs/file.c
+++ b/fs/exofs/file.c
@@ -49,6 +49,10 @@ static int exofs_file_fsync(struct file *filp, struct dentry *dentry,
 	struct address_space *mapping = filp->f_mapping;
 
 	ret1 = filemap_write_and_wait(mapping);
+	/*Note: file_fsync below also calles sync_blockdev, which is a no-op
+	 *      for exofs, but other then that it does sync_inode and
+	 *      sync_superblock which is what we need here.
+	 */
 	ret2 = file_fsync(filp, dentry, datasync);
 
 	return ret1 ? ret1 : ret2;
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
index 0f52e76..739629a 100644
--- a/fs/exofs/inode.c
+++ b/fs/exofs/inode.c
@@ -55,7 +55,7 @@ struct page_collect {
 	long pg_first;
 };
 
-void _pcol_init(struct page_collect *pcol, unsigned expected_pages,
+static void _pcol_init(struct page_collect *pcol, unsigned expected_pages,
 		struct inode *inode)
 {
 	struct exofs_sb_info *sbi = inode->i_sb->s_fs_info;
@@ -75,7 +75,7 @@ void _pcol_init(struct page_collect *pcol, unsigned expected_pages,
 		     expected_pages);
 }
 
-void _pcol_reset(struct page_collect *pcol)
+static void _pcol_reset(struct page_collect *pcol)
 {
 	pcol->expected_pages -= min(pcol->nr_pages, pcol->expected_pages);
 
@@ -93,7 +93,7 @@ void _pcol_reset(struct page_collect *pcol)
 		pcol->expected_pages = 128;
 }
 
-int pcol_try_alloc(struct page_collect *pcol)
+static int pcol_try_alloc(struct page_collect *pcol)
 {
 	int pages = min_t(unsigned, pcol->expected_pages, BIO_MAX_PAGES);
 
@@ -103,18 +103,19 @@ int pcol_try_alloc(struct page_collect *pcol)
 			return 0;
 	}
 
-	EXOFS_ERR("Failed to kcalloc expected_pages=%d\n",
+	EXOFS_ERR("Failed to kcalloc expected_pages=%u\n",
 		  pcol->expected_pages);
 	return -ENOMEM;
 }
 
-void pcol_free(struct page_collect *pcol)
+static void pcol_free(struct page_collect *pcol)
 {
 	bio_put(pcol->bio);
 	pcol->bio = NULL;
 }
 
-int pcol_add_page(struct page_collect *pcol, struct page *page, unsigned len)
+static int pcol_add_page(struct page_collect *pcol, struct page *page,
+			 unsigned len)
 {
 	int added_len = bio_add_pc_page(pcol->req_q, pcol->bio, page, len, 0);
 	if (unlikely(len != added_len))
@@ -173,9 +174,9 @@ static int __readpages_done(struct osd_request *or, struct page_collect *pcol,
 
 	osd_end_request(or);
 
-	if (!ret)
+	if (likely(!ret))
 		good_bytes = pcol->length;
-	else if (ret && !resid)
+	else if (!resid)
 		good_bytes = 0;
 	else
 		good_bytes = pcol->length - resid;
@@ -227,7 +228,7 @@ static void readpages_done(struct osd_request *or, void *p)
 	kfree(p);
 }
 
-void _unlock_pcol_pages(struct page_collect *pcol, int ret, int rw)
+static void _unlock_pcol_pages(struct page_collect *pcol, int ret, int rw)
 {
 	struct bio_vec *bvec;
 	int i;
@@ -245,7 +246,7 @@ void _unlock_pcol_pages(struct page_collect *pcol, int ret, int rw)
 	pcol_free(pcol);
 }
 
-int read_exec(struct page_collect *pcol, bool is_sync)
+static int read_exec(struct page_collect *pcol, bool is_sync)
 {
 	struct exofs_i_info *oi = exofs_i(pcol->inode);
 	struct osd_obj_id obj = {pcol->sbi->s_pid,
@@ -452,7 +453,7 @@ static void writepages_done(struct osd_request *or, void *p)
 
 	if (likely(!ret))
 		good_bytes = pcol->length;
-	else if (ret && !resid)
+	else if (!resid)
 		good_bytes = 0;
 	else
 		good_bytes = pcol->length - resid;
@@ -493,7 +494,7 @@ static void writepages_done(struct osd_request *or, void *p)
 	EXOFS_DBGMSG("writepages_done END\n");
 }
 
-int write_exec(struct page_collect *pcol)
+static int write_exec(struct page_collect *pcol)
 {
 	struct exofs_i_info *oi = exofs_i(pcol->inode);
 	struct osd_obj_id obj = {pcol->sbi->s_pid,
@@ -631,7 +632,7 @@ fail:
 	return ret;
 }
 
-int exofs_writepages(struct address_space *mapping,
+static int exofs_writepages(struct address_space *mapping,
 		       struct writeback_control *wbc)
 {
 	struct page_collect pcol;
@@ -1110,6 +1111,14 @@ struct inode *exofs_new_inode(struct inode *dir, int mode)
 }
 
 /*
+ * struct to pass two arguments to update_inode's callback
+ */
+struct updatei_args {
+	struct exofs_sb_info	*sbi;
+	struct exofs_fcb	fcb;
+};
+
+/*
  * Callback function from exofs_update_inode().
  */
 static void updatei_done(struct osd_request *or, void *p)
@@ -1218,16 +1227,6 @@ int exofs_write_inode(struct inode *inode, int wait)
 	return exofs_update_inode(inode, wait);
 }
 
-int exofs_sync_inode(struct inode *inode)
-{
-	struct writeback_control wbc = {
-		.sync_mode = WB_SYNC_ALL,
-		.nr_to_write = 0,	/* sys_fsync did this */
-	};
-
-	return sync_inode(inode, &wbc);
-}
-
 /*
  * Callback function from exofs_delete_inode() - don't have much cleaning up to
  * do.
diff --git a/fs/exofs/super.c b/fs/exofs/super.c
index 9153db2..989952b 100644
--- a/fs/exofs/super.c
+++ b/fs/exofs/super.c
@@ -45,6 +45,15 @@
  *****************************************************************************/
 
 /*
+ * struct to hold what we get from mount options
+ */
+struct exofs_mountopt {
+	const char *dev_name;
+	uint64_t pid;
+	int timeout;
+};
+
+/*
  * exofs-specific mount-time options.
  */
 enum { Opt_pid, Opt_to, Opt_mkfs, Opt_format, Opt_err };

  parent reply	other threads:[~2009-03-23 13:08 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-18 17:45 [PATCHSET 0/8 version 4] exofs for kernel 2.6.30 Boaz Harrosh
2009-03-18 17:57 ` [PATCH 1/8] exofs: Kbuild, Headers and osd utils Boaz Harrosh
2009-03-18 17:58 ` [PATCH 2/8] exofs: file and file_inode operations Boaz Harrosh
2009-03-31  8:04   ` Andrew Morton
2009-03-31  8:58     ` Boaz Harrosh
2009-03-18 18:01 ` [PATCH 3/8] exofs: symlink_inode and fast_symlink_inode operations Boaz Harrosh
2009-03-18 18:04 ` [PATCH 4/8] exofs: address_space_operations Boaz Harrosh
2009-03-22 10:22   ` Marcin Slusarz
2009-03-22 10:41     ` Boaz Harrosh
2009-03-22 13:58   ` [PATCH 4/8 ver5] " Boaz Harrosh
2009-03-31  8:04     ` Andrew Morton
2009-03-31  9:04       ` Boaz Harrosh
2009-03-31 10:15         ` Andrew Morton
2009-03-31 10:27           ` Boaz Harrosh
2009-03-18 18:08 ` [PATCH 5/8] exofs: dir_inode and directory operations Boaz Harrosh
2009-03-31  8:04   ` Andrew Morton
2009-03-31 10:22     ` Boaz Harrosh
2009-03-18 18:09 ` [PATCH 6/8] exofs: super_operations and file_system_type Boaz Harrosh
2009-03-31  8:04   ` Andrew Morton
2009-03-31 10:29     ` Boaz Harrosh
2009-03-31 18:52     ` [osd-dev] " Benny Halevy
2009-04-01  8:05       ` Boaz Harrosh
2009-04-01  9:06         ` Benny Halevy
2009-03-18 18:10 ` [PATCH 7/8] exofs: Documentation Boaz Harrosh
2009-03-21 13:26   ` Evgeniy Polyakov
2009-03-22  8:42     ` Boaz Harrosh
2009-03-18 18:11 ` [PATCH 8/8] fs: Add exofs to Kernel build Boaz Harrosh
2009-03-23 13:06 ` Boaz Harrosh [this message]
2009-03-24  9:07 ` [PATCHSET 0/8 version 4] exofs for kernel 2.6.30 Boaz Harrosh
2009-03-30 21:22 ` Andrew Morton
2009-03-31  3:01   ` Stephen Rothwell
2009-03-31  7:13     ` Evgeniy Polyakov
2009-03-31  7:20   ` Boaz Harrosh
2009-03-31  7:41     ` Boaz Harrosh
2009-03-31  8:04       ` Andrew Morton
     [not found] ` <1237399056-29171-1-git-send-email-bharrosh@panasas.com>
2009-03-31  8:04   ` [PATCH 1/8] exofs: Kbuild, Headers and osd utils Andrew Morton
2009-03-31  8:57     ` Boaz Harrosh
2009-04-01  9:23 ` [PATCHSET 0/8 version 4] exofs for kernel 2.6.30 Jeff Garzik
2009-04-01 11:21   ` Boaz Harrosh
2009-04-02  0:39     ` Jeff Garzik
2009-04-02 12:49       ` Boaz Harrosh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49C78959.4040109@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=jeff@garzik.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=osd-dev@open-osd.org \
    --cc=zbr@iorema \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).