Cool -- my first Dfly contribution (in my favorite part of a Unix[-like] OS, the kernel). Albeit it's a 1 byte change, it still fixes some very common use cases. Regards, Jon ________________________________________ From: kernel-errors@crater.dragonflybsd.org [kernel-errors@crater.dragonflybsd.org] On Behalf Of Matthew Dillon [dillon@apollo.backplane.com] Sent: Tuesday, June 10, 2008 11:20 AM To: kernel@crater.dragonflybsd.org Subject: Re: 0 bytes sized file can't be written to a HAMMER partition :> It looks like the code should be changed to: :> :> if (uio->uio_offset < 0 || uio->uio_offset + uio->uio_resid < 0) { :> hammer_done_transaction(&trans); :> return (EFBIG); :> } : :Applying that change the issue I'm able to copy zero-bytes sized files :to a HAMMER partition: : :master# touch /tmp/qq && cp /tmp/qq /datapool/ :master# ls -l /datapool/qq :-rw-r--r-- 1 root wheel 0 Jun 10 19:43 /datapool/qq :master# mount |grep datapool :datapool on /datapool (hammer, local) : :Thank you :Antonio Huete I'll commit the fix. It needs one slight modification though because changing that '<=' to '<' allows a wrap case to get past when uio_resid != 0. -Matt
| david | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Jan Engelhardt | intel iommu (Re: -mm merge plans for 2.6.23) |
git: | |
| David Miller | [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Natalie Protasevich | [BUG] New Kernel Bugs |
