From: Eric Sandeen <sandeen@redhat.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] export iov_shorten for ext4's use
Date: Mon, 17 Dec 2007 09:14:22 -0600 [thread overview]
Message-ID: <4766924E.9000908@redhat.com> (raw)
In-Reply-To: <4762C470.8040003@redhat.com>
(And, take 2... follow the coding style on export declarations...)
ext4 needs to deal with 2 different max file offsets for block- and
extent-allocated file formats, whereas the s_maxbytes scheme can only deal
with one. So, for block-allocated files, we must catch and fix up
too-large offsets from within the filesystem.
Having iov_shorten exported allows such things as:
if (pos + length > sbi->s_bitmap_maxbytes) {
nr_segs = iov_shorten((struct iovec *)iov, nr_segs,
sbi->s_bitmap_maxbytes - pos);
}
to fix up too-large writes to these files in ext4_file_write().
This patch is currently living in the ext4 patch queue.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
Index: linux-2.6.24-rc3/fs/read_write.c
===================================================================
--- linux-2.6.24-rc3.orig/fs/read_write.c
+++ linux-2.6.24-rc3/fs/read_write.c
@@ -450,6 +450,7 @@ unsigned long iov_shorten(struct iovec *
}
return seg;
}
+EXPORT_SYMBOL(iov_shorten)
ssize_t do_sync_readv_writev(struct file *filp, const struct iovec *iov,
unsigned long nr_segs, size_t len, loff_t *ppos, iov_fn_t fn)
prev parent reply other threads:[~2007-12-17 15:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-14 17:59 [PATCH] export iov_shorten for ext4's use Eric Sandeen
2007-12-17 15:14 ` Eric Sandeen [this message]
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=4766924E.9000908@redhat.com \
--to=sandeen@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.