From: Alex P. <pes...@ma...> - 2007-07-25 06:38:27
|
On Tuesday 24 July 2007 20:12, Leyne, Sean wrote: > Alex, > > > > Disk sectors have been 512 bytes for the last 20 years and likely > > for > > > > many more. Accordingly, our disk accesses will always be on sector > > > boundaries. > > > > Sean, problem is that not all of our buffers are 512 bytes aligned > > now. > > Which buffers? > for example, this one: static bool raw_devices_validate_database ( ... char header[MIN_PAGE_SIZE]; ... const ssize_t bytes = read (desc, header, sizeof(header)); I don't say it's impossible to make all of them aligned, but it was not done yet. > The only buffers which need to be aligned would be those that would be > written to disk AND where the file was opened with the special flag. And read from disk to, me thinks? > I was expecting that only the database file would be opened with the > flag. Yes, certainly. |