Skip to contentSkip to conversation

please review recent fixes for file write and fiemap

DISCUSSION Chris Mason 2 participants 2 messages Mar 8, 2011 – Mar 9, 2011 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hi Everyone,

The master branch of the btrfs-unstable tree has three shiny new commits, which fix some important bugs in file_write and fiemap.

These are not yet pushed to Linus but the plan is to send them out before the final .38 release.

The commits fix errors in the copy_from_user handling where short returns or zero returns would make btrfs_file_write do the wrong thing. This included looping forever, or pretending pages were up to date when they really were not.

There is also another fiemap fix. Our fiemap was returning overlapping extents, which made recent versions of cp copy too many bytes into the destination file.

The top commit is this one (just in case kernel.org hasn't caught up yet)

commit ea8efc74bd0402b4d5f663d007b4e25fa29ea778

Author: Chris Mason <[email protected]>
Date:   Tue Mar 8 11:54:40 2011 -0500

Btrfs: make sure not to return overlapping extents to fiemap

Please read them, and try to break them ;)

-chris

#1 lore raw

On Tue, Mar 8, 2011 at 11:58 AM, Chris Mason <[email protected]> w= rote:

Quoted 10 lines

Hi Everyone,

The master branch of the btrfs-unstable tree has three shiny new commits, which fix some important bugs in file_write and fiemap.

These are not yet pushed to Linus but the plan is to send them out before the final .38 release.

The commits fix errors in the copy_from_user handling where short returns or zero returns would make btrfs_file_write do the wrong thin=

g.

Quoted 1 line

This included looping forever, or pretending pages were up to date wh=

en

Quoted 3 lines

they really were not.

There is also another fiemap fix. Our fiemap was returning overlappin=

g

Quoted 1 line

extents, which made recent versions of cp copy too many bytes into th=

e

Quoted 9 lines

destination file.

The top commit is this one (just in case kernel.org hasn't caught up yet)

commit ea8efc74bd0402b4d5f663d007b4e25fa29ea778
Author: Chris Mason <[email protected]>
Date: =A0 Tue Mar 8 11:54:40 2011 -0500

Quoted 5 lines

=A0 =A0Btrfs: make sure not to return overlapping extents to fiemap

Please read them, and try to break them ;)

-chris

I applied these three patches as commited to btrfs-unstable, and re-tested the operations that had been giving me problems (Openmotif and gcc-4.4.5 building).

They are working good for me.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html