[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <OF861D7F24.6F60C82D-ON88257428.005C1DA4-88257428.005D5D80@us.ibm.com>
Date: Fri, 11 Apr 2008 09:59:45 -0700
From: Bryan Henderson <hbryan@...ibm.com>
To: lsorense@...lub.uwaterloo.ca (Lennart Sorensen)
Cc: Bodo Eggert <7eggert@....de>, Diego Calleja <diegocg@...il.com>,
Jan Kara <jack@...e.cz>, Jiri Kosina <jkosina@...e.cz>,
linux-fsdevel@...r.kernel.org,
Linux Kernel list <linux-kernel@...r.kernel.org>,
Michal Hocko <mhocko@...e.cz>, Meelis Roos <mroos@...ux.ee>
Subject: Re: file offset corruption on 32-bit machines?
>So if you write multithreaded code and don't understand what locking
>around shared resources is for, then your application might break.
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 you give an example where locking is being used correctly where this
can
>possibly fail?
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists