Re: file offset corruption on 32-bit machines?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Bryan Henderson
Date: Friday, April 11, 2008 - 9:59 am

>So if you write multithreaded code and don't understand what locking

I think I know what locking around shared resources is for, which is why 
I'm surprised the kernel doesn't do it.

Is it normal for a kernel resource not to be thread-safe (i.e. you don't 
get advertised/sensible results if two threads access it at the same 
time)?

can

I could accept (though I haven't thought about it) that there aren't any 
real-world applications that do simultaneous reads and writes through the 
same file pointer.  I might even accept that there can be no useful 
application that does.  But can you say such an application is incorrect?

--
Bryan Henderson                     IBM Almaden Research Center
San Jose CA                         Filesystems

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: file offset corruption on 32-bit machines?, Bodo Eggert, (Fri Apr 11, 5:24 am)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Fri Apr 11, 6:55 am)
Re: file offset corruption on 32-bit machines?, Bryan Henderson, (Fri Apr 11, 9:59 am)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Fri Apr 11, 10:15 am)
Re: file offset corruption on 32-bit machines?, Bryan Henderson, (Fri Apr 11, 2:29 pm)
Re: file offset corruption on 32-bit machines?, Pavel Machek, (Sat Apr 12, 1:48 am)
Re: file offset corruption on 32-bit machines?, Jan Kara, (Mon Apr 14, 9:20 am)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Mon Apr 14, 9:22 am)
Re: file offset corruption on 32-bit machines?, Jan Kara, (Mon Apr 14, 9:53 am)
Re: file offset corruption on 32-bit machines?, Alan Cox, (Mon Apr 14, 9:54 am)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Mon Apr 14, 10:06 am)
Re: file offset corruption on 32-bit machines?, Alexey Dobriyan, (Mon Apr 14, 11:34 am)
Re: file offset corruption on 32-bit machines?, Jan Kara, (Mon Apr 14, 12:03 pm)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Mon Apr 14, 12:29 pm)
Re: file offset corruption on 32-bit machines?, Jan Kara, (Mon Apr 14, 12:42 pm)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Mon Apr 14, 12:45 pm)
Re: file offset corruption on 32-bit machines?, Pavel Machek, (Tue Apr 15, 1:57 am)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Tue Apr 15, 8:32 am)
Re: file offset corruption on 32-bit machines?, Pavel Machek, (Tue Apr 15, 10:34 am)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Tue Apr 15, 11:24 am)
Re: file offset corruption on 32-bit machines?, Pavel Machek, (Tue Apr 15, 12:12 pm)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Tue Apr 15, 12:49 pm)
Re: file offset corruption on 32-bit machines?, Pavel Machek, (Tue Apr 15, 1:06 pm)
Re: file offset corruption on 32-bit machines?, Peter Zijlstra, (Tue Apr 15, 1:28 pm)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Tue Apr 15, 1:29 pm)
Re: file offset corruption on 32-bit machines?, Bryan Henderson, (Tue Apr 15, 3:11 pm)
Re: file offset corruption on 32-bit machines?, Pavel Machek, (Wed Apr 16, 1:15 am)
Re: file offset corruption on 32-bit machines?, Peter Zijlstra, (Wed Apr 16, 1:20 am)
Re: file offset corruption on 32-bit machines?, Jamie Lokier, (Wed Apr 16, 2:40 am)
Re: file offset corruption on 32-bit machines?, Alan Cox, (Wed Apr 16, 3:54 am)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Wed Apr 16, 6:57 am)