[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130115130211.GA13492@gmail.com>
Date: Tue, 15 Jan 2013 21:02:11 +0800
From: Zheng Liu <gnehzuil.liu@...il.com>
To: Theodore Ts'o <tytso@....edu>
Cc: linux-ext4@...r.kernel.org, Zheng Liu <wenqing.lz@...bao.com>
Subject: Re: [PATCH 1/2 v2] libext2fs: introduce lseek SEEK_DATA/HOLE
On Mon, Jan 14, 2013 at 10:23:29PM -0500, Theodore Ts'o wrote:
> On Mon, Jan 14, 2013 at 10:18:30PM +0800, Zheng Liu wrote:
> >
> > ext2fs_file_llseek_data/hole() seem to be weird because ext2_file_t
> > structure is hidden by a typedef. The caller can not dereference
> > it. So I define a marco called EXT2_SEEK_OFFSET_INVALID to let the
> > caller indicate that it find the data/hole from ext2_file_t->pos or
> > from offset. What do you think?
>
> Is the problem you're worried about is that the user can't get current
> location?
>
> That's pretty easy to solve. You can get it the same way it works
> with the lseek(2) system call.
>
> retval = ext2fs_file_llseek(file, 0, SEEK_CUR, &pos);
>
> Upon the return, pos will be contain the current file offset.
Ah, I see. I will remove EXT2_SEEK_OFFSET_INVALID flag in next version.
Thanks,
- Zheng
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists