public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jose R. Santos" <jrs@us.ibm.com>
To: "Theodore Ts'o" <tytso@mit.edu>, linux-ext4@vger.kernel.org
Subject: [PATCH 14/15][e2fsprogs] Add 64-bit mkjournal.c interface
Date: Wed, 20 Aug 2008 12:34:13 -0500	[thread overview]
Message-ID: <20080820173413.23412.82350.stgit@gara> (raw)
In-Reply-To: <20080820173210.23412.46020.stgit@gara>

From: Jose R. Santos <jrs@us.ibm.com>

Add 64-bit mkjournal.c interface

Added 64-bit mkjournal.c interface.  Needed to zero inode tables.

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
--

 lib/ext2fs/ext2fs.h    |    2 ++
 lib/ext2fs/mkjournal.c |   18 +++++++++++++++---
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
index 8703b79..8985419 100644
--- a/lib/ext2fs/ext2fs.h
+++ b/lib/ext2fs/ext2fs.h
@@ -1110,6 +1110,8 @@ extern errcode_t ext2fs_mkdir(ext2_filsys fs, ext2_ino_t parent, ext2_ino_t inum
 /* mkjournal.c */
 extern errcode_t ext2fs_zero_blocks(ext2_filsys fs, blk_t blk, int num,
 				    blk_t *ret_blk, int *ret_count);
+extern errcode_t ext2fs_zero_blocks2(ext2_filsys fs, blk64_t blk, int num,
+				     blk64_t *ret_blk, int *ret_count); 
 extern errcode_t ext2fs_create_journal_superblock(ext2_filsys fs,
 						  __u32 size, int flags,
 						  char  **ret_jsb);
diff --git a/lib/ext2fs/mkjournal.c b/lib/ext2fs/mkjournal.c
index e55dcbd..8c3b93f 100644
--- a/lib/ext2fs/mkjournal.c
+++ b/lib/ext2fs/mkjournal.c
@@ -145,8 +145,8 @@ errout:
  * programs that check for memory leaks happy.)
  */
 #define STRIDE_LENGTH 8
-errcode_t ext2fs_zero_blocks(ext2_filsys fs, blk_t blk, int num,
-			     blk_t *ret_blk, int *ret_count)
+errcode_t ext2fs_zero_blocks2(ext2_filsys fs, blk64_t blk, int num,
+			      blk64_t *ret_blk, int *ret_count)
 {
 	int		j, count;
 	static char	*buf;
@@ -179,7 +179,7 @@ errcode_t ext2fs_zero_blocks(ext2_filsys fs, blk_t blk, int num,
 			if (count > STRIDE_LENGTH)
 				count = STRIDE_LENGTH;
 		}
-		retval = io_channel_write_blk(fs->io, blk, count, buf);
+		retval = io_channel_write_blk64(fs->io, blk, count, buf);
 		if (retval) {
 			if (ret_count)
 				*ret_count = count;
@@ -192,6 +192,18 @@ errcode_t ext2fs_zero_blocks(ext2_filsys fs, blk_t blk, int num,
 	return 0;
 }
 
+errcode_t ext2fs_zero_blocks(ext2_filsys fs, blk_t blk, int num,
+			     blk_t *ret_blk, int *ret_count)
+{
+	blk64_t ret_blk2;
+	errcode_t retval;
+
+	retval = ext2fs_zero_blocks2(fs, blk, num, &ret_blk2, ret_count);
+	if (retval)
+		*ret_blk = (blk_t) ret_blk2;
+	return retval;
+}
+
 /*
  * Helper function for creating the journal using direct I/O routines
  */


  parent reply	other threads:[~2008-08-20 17:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-20 17:32 [PATCH 00/15] [e2fsprogs] Initial blk64_t capable API calls Jose R. Santos
2008-08-20 17:32 ` [PATCH 01/15][e2fsprogs] libext2fs: Add 64-bit support to the undo manager Jose R. Santos
2008-08-20 17:32 ` [PATCH 02/15][e2fsprogs] Add ext2_off64_t type Jose R. Santos
2008-08-20 17:32 ` [PATCH 03/15][e2fsprogs] Add new blk64_t handling functions Jose R. Santos
2008-08-20 17:33 ` [PATCH 04/15][e2fsprogs] Use blk64_t for blocks in struct ext2_file Jose R. Santos
2008-08-20 17:33 ` [PATCH 05/15][e2fsprogs] Add 64-bit dirblock interface Jose R. Santos
2008-08-20 17:33 ` [PATCH 06/15][e2fsprogs] Add 64-bit alloc_stats interface Jose R. Santos
2008-08-20 17:33 ` [PATCH 07/15][e2fsprogs] Add 64-bit alloc interface Jose R. Santos
2008-08-20 17:33 ` [PATCH 08/15][e2fsprogs] Add 64-bit ext_attr interface Jose R. Santos
2008-08-20 17:33 ` [PATCH 09/15][e2fsprogs] Add 64-bit closefs interface Jose R. Santos
2008-08-20 17:33 ` [PATCH 10/15][e2fsprogs] Use new ext2fs_super_and_bgd_loc2 call in libext2fs Jose R. Santos
2008-08-20 17:33 ` [PATCH 11/15][e2fsprogs] Add 64-bit openfs interface Jose R. Santos
2008-08-20 17:33 ` [PATCH 12/15][e2fsprogs] Add ext2fs_div64_ceil() Jose R. Santos
2008-08-20 17:34 ` [PATCH 13/15][e2fsprogs] Add 64-bit getsize interface Jose R. Santos
2008-08-20 17:34 ` Jose R. Santos [this message]
2008-08-20 17:34 ` [PATCH 15/15][e2fsprogs] 64-bit mke2fs cleanup Jose R. Santos
  -- strict thread matches above, loose matches on Subject: below --
2008-07-15 16:50 [PATCH 00/15][e2fsprogs] Initial blk64_t capable API calls Jose R. Santos
2008-07-15 16:51 ` [PATCH 14/15][e2fsprogs] Add 64-bit mkjournal.c interface Jose R. Santos

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=20080820173413.23412.82350.stgit@gara \
    --to=jrs@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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