Re: [PATCH 03/14] tgt: Make defintion of sync_file_range a configure option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 25 Feb 2009 10:55:25 +0200
Boaz Harrosh <bharrosh@xxxxxxxxxxx> wrote:

> FUJITA Tomonori wrote:
> > On Mon, 23 Feb 2009 19:51:25 +0200
> > Boaz Harrosh <bharrosh@xxxxxxxxxxx> wrote:
> > 
> >> usr/util.h redefines sync_file_range (as __sync_file_range)
> >> for old systems that don't have this defintion. Make these
> >> definitions conditional on __CONF_TGT_NO_SYNC_FILE_RANGE which
> >> should be set by a Makefile on very old systems.
> >> (Or a ./configure script can detect that automatically)
> >>
> >> Normally sync_file_range() definition is now taken from gcc
> >> headers.
> >>
> >> Signed-off-by: Boaz Harrosh <bharrosh@xxxxxxxxxxx>
> >> ---
> >>  usr/bs_mmap.c |    2 +-
> >>  usr/bs_rdwr.c |    2 +-
> >>  usr/util.h    |    6 ++++--
> >>  3 files changed, 6 insertions(+), 4 deletions(-)
> > 
> > Using "sync_file_range" does not work on a box having glibc supporting
> > sync_file_range properly, I think.
> > 
> 
> I don't understand? Are you saying that sync_file_range() is
> broken in glibc? On my new FC10 the source looks the same
> as yours. Do you have any info on what systems are broken and
> how?
> 
> I will try to investigate this, any pointers will help
> Thanks.

I guess that you should test your patch on different environments.

You patch wrongly assumes that glibc has sync_file_range. With debian
etch, I got the following error:

bs_rdwr.o: In function `bs_sync_sync_range':
/home/fujita/git/tgt/usr/bs_rdwr.c:54: undefined reference to `sync_file_range'
collect2: ld returned 1 exit status


The code need to work both with and without sync_file_range in
glibc. That's what I pointed out in the previous mail.
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux