Re: [RFC][Patch 2/6] integrity: fs hook placement

2007-03-08 Thread Dmitriy Monakhov
Mimi Zohar [EMAIL PROTECTED] writes: This patch places calls to the new integrity hooks in the appropriate places in the fs directory. It is not meant in any way to be viewed as a complete set, but used as a basis for an initial discussion. Index:

[patch] kobject: kobject_shadow_add cleanup

2007-03-10 Thread Dmitriy Monakhov
- correct function name in comments - parrent assignment does metter only inside if block, so move it inside this block. Signed-off-by: Monakhov Dmitriy [EMAIL PROTECTED] diff --git a/lib/kobject.c b/lib/kobject.c index b94f208..e4b477d 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@

Re: [PATCH 8/9] Driver core: fix error by cleanup up symlinks properly

2007-03-10 Thread Dmitriy Monakhov
Greg Kroah-Hartman [EMAIL PROTECTED] writes: From: James Simmons [EMAIL PROTECTED] When a device fails to register the class symlinks where not cleaned up. This left a symlink in the /sys/class/device/ directory that pointed to no where. This caused the sysfs_follow_link Oops I reported

[PATCH] driver core: fix device_add error path

2007-03-11 Thread Dmitriy Monakhov
Dmitriy Monakhov [EMAIL PROTECTED] writes: Greg Kroah-Hartman [EMAIL PROTECTED] writes: From: James Simmons [EMAIL PROTECTED] When a device fails to register the class symlinks where not cleaned up. This left a symlink in the /sys/class/device/ directory that pointed to no where

[PATCH] driver core: handles kobject_uevent failure while device_add

2007-03-11 Thread Dmitriy Monakhov
Signed-off-by: Monakhov Dmitriy [EMAIL PROTECTED] --- drivers/base/core.c | 10 -- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index 142c222..da73012 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -630,8 +630,11

[PATCH] driver core: handle sysfs_op failure while device_add

2007-03-11 Thread Dmitriy Monakhov
depends on: [PATCH] driver core: fix device_add error path - rearrange error path sequence, in order to make it more correct. In fact if initial sequance was doA(); doB(); doC(); we should undo it with folowing sequance undoC(); undoB(); undoA(); - handle sysfs_ops failure This patch

Re: [PATCH] ext3: dirindex error pointer issues (b)

2007-03-12 Thread Dmitriy Monakhov
Dmitriy Monakhov [EMAIL PROTECTED] writes: - ext3_dx_find_entry() exit with out setting proper error pointer - do_split() exit with out setting proper error pointer it is realy painful because many callers contain folowing code: de = do_split(handle,dir, bh, frame, hinfo

[PATCH 1/2] mm: move common segment checks to separate helper function (v6)

2007-03-12 Thread Dmitriy Monakhov
I realy don't want to be annoying by sending this patcheset over and over again. If anyone think this patch is realy cappy, please comment what exectly is bad. Thank you. Changes: - patch was split in two patches. - comments added. I think now it is clearly describe things. - make

[PATCH 2/2] mm: incorrect direct io error handling (v6)

2007-03-12 Thread Dmitriy Monakhov
I realy don't want to be annoying by sending this patcheset over and over again, i just want the issue to be solved. If anyone think this solution is realy cappy, please comment what exectly is bad. Thank you. Changes: - patch was split in two patches. - comments added. I think now it is

Re: [PATCH 2/2] mm: incorrect direct io error handling (v6)

2007-03-12 Thread Dmitriy Monakhov
Nick Piggin [EMAIL PROTECTED] writes: On Mon, Mar 12, 2007 at 10:58:10AM +0300, Dmitriy Monakhov wrote: I realy don't want to be annoying by sending this patcheset over and over again, i just want the issue to be solved. If anyone think this solution is realy cappy, please comment what

Re: [PATCH 2/2] mm: incorrect direct io error handling (v6)

2007-03-12 Thread Dmitriy Monakhov
Nick Piggin [EMAIL PROTECTED] writes: On Mon, Mar 12, 2007 at 11:55:30AM +0300, Dmitriy Monakhov wrote: Nick Piggin [EMAIL PROTECTED] writes: On Mon, Mar 12, 2007 at 10:58:10AM +0300, Dmitriy Monakhov wrote: @@ -2240,6 +2241,29 @@ ssize_t generic_file_aio_write(struct kiocb *iocb

Re: [PATCH 1/2] mm: move common segment checks to separate helper function (v6)

2007-03-12 Thread Dmitriy Monakhov
Nick Piggin [EMAIL PROTECTED] writes: On Mon, Mar 12, 2007 at 10:57:53AM +0300, Dmitriy Monakhov wrote: I realy don't want to be annoying by sending this patcheset over and over again. If anyone think this patch is realy cappy, please comment what exectly is bad. Thank you. Doesn't seem

[PATCH 2/2] incorrect direct io error handling (v7)

2007-03-12 Thread Dmitriy Monakhov
Changes against v6: - Handle direct_io failure inside generic_file_direct_write() as it was recommend by Andrew (during discussion v1), and by Nick (during discussion v6). - change comments, make it more clear. - one more time check what __generic_file_aio_write_nolock() always called

[PATCH 1/2] mm: move common segment checks to separate helper function (v7)

2007-03-12 Thread Dmitriy Monakhov
Changes against v6 - remove duplicated code from xfs,ntfs - export generic_segment_checks, because it used by xfs,nfs now. - change arguments initialization pocily according to Nick's comments. Tested with: ltp readv/writev tests Signed-off-by: Monakhov Dmitriy [EMAIL PROTECTED] ---

[PATCH] splice: partial write handling fix

2007-03-14 Thread Dmitriy Monakhov
currently if partial write has happened while -commit_write() then page wasn't marked as accessed and rebalanced. Signed-off-by: Monakhov Dmitriy [EMAIL PROTECTED] diff --git a/fs/splice.c b/fs/splice.c index 2fca6eb..bb1bf62 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -682,18 +682,25 @@

Re: [patch 2/5] fs: introduce new aops and infrastructure

2007-03-14 Thread Dmitriy Monakhov
Nick Piggin [EMAIL PROTECTED] writes: Introduce write_begin, write_end, and perform_write aops. These are intended to replace prepare_write and commit_write with more flexible alternatives that are also able to avoid the buffered write deadlock problems efficiently (which prepare_write is

Re: [patch 2/5] fs: introduce new aops and infrastructure

2007-03-15 Thread Dmitriy Monakhov
Nick Piggin [EMAIL PROTECTED] writes: Index: linux-2.6/fs/splice.c === --- linux-2.6.orig/fs/splice.c +++ linux-2.6/fs/splice.c @@ -559,7 +559,7 @@ static int pipe_to_file(struct pipe_inod struct address_space *mapping =

Re: [PATCH] splice: partial write handling fix

2007-03-15 Thread Dmitriy Monakhov
Jens Axboe [EMAIL PROTECTED] writes: On Wed, Mar 14 2007, Dmitriy Monakhov wrote: currently if partial write has happened while -commit_write() then page wasn't marked as accessed and rebalanced. The -commit_write() return values aren't very well designed imho. Is your fix correct getting

[PATCH 0/1][RFC] prepare_write positive return value V(2)

2007-02-12 Thread Dmitriy Monakhov
connected with proposed prepare_write semantic changes: __page_symlink : If find_or_create_page has failed on second retry attempt function will exit with wrong error code. __generic_cont_expand: Add correct AOP_TRUNCATED_PAGE handling. Signed-off-by: Dmitriy Monakhov [EMAIL

[PATCH 1/1][RFC] EXT34 retry loop issue V(2)

2007-02-12 Thread Dmitriy Monakhov
-in-ext3_prepare_write-violate-ordering-requirements: i_size may increase after error happend. possible data corruption caused commiting non uptodate bh. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] - diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index dba6dd2..4c5e9f7 100644 --- a/fs/ext3

Re: [PATCH] ecryptfs lower file handling code issues

2007-02-12 Thread Dmitriy Monakhov
Dmitriy Monakhov [EMAIL PROTECTED] writes: eCryptfs lower file handling code has several issues: - Retval from prepare_write()/commit_writ() was't checked to equality to AOP_TRUNCATED_PAGE. - In some places page was't unmapped and unlocked after error. it is easy to retproduce

[PATCH]mm incorrect direct io error handling (v4)

2007-02-15 Thread Dmitriy Monakhov
, blocks, and sizes Inode 14, i_size is 0, should be 56556544. Fixy? yes Pass 2: Checking directory structure Changes not dirrectly connected with issue: - move common segment checks to separate helper function. Patch pass ltp and fsstres test. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED

[PATCH]mm __page_symlink retry loop error code fix

2007-02-15 Thread Dmitriy Monakhov
2.6.20-rc6-mm3. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] --- diff --git a/fs/namei.c b/fs/namei.c index 723db81..6b6fe43 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2692,10 +2692,11 @@ int __page_symlink(struct inode *inode, const char *symname, int len, { struct

[PATCH] ecryptfs lower_file handling issues

2007-02-19 Thread Dmitriy Monakhov
to reproduce with full lower_fs, in this case prepare_write() will return ENOSPC. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] - diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c index 1e5d2ba..0cebb75 100644 --- a/fs/ecryptfs/mmap.c +++ b/fs/ecryptfs/mmap.c @@ -238,7 +238,6

[PATCH 2/2] fs: incorrect direct io error handling v8

2007-03-19 Thread Dmitriy Monakhov
1: Checking inodes, blocks, and sizes Inode 14, i_size is 0, should be 56556544. Fixy? yes Pass 2: Checking directory structure #TESTCASE_END Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] --- mm/filemap.c | 24 1 files changed, 20 insertions(+), 4

[PATCH 1/2] fs: remove duplicated iovec checking code v8

2007-03-19 Thread Dmitriy Monakhov
Where are several places where the same code used for iovec checks. This patch just move this code to separate helper function, and replace duplicated code with it. IMHO it is better because these are checks that we want for all filesystems/drivers that use vectored I/O. Signed-off-by: Dmitriy

Re: [PATCH][5/5][resend] floppy.c: Fix device_create_file() warning

2007-03-21 Thread Dmitriy Monakhov
Jesper Juhl [EMAIL PROTECTED] writes: On 20/03/07, Mikael Pettersson [EMAIL PROTECTED] wrote: On Mon, 19 Mar 2007 18:42:22 +0100, Jesper Juhl wrote: --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -4302,7 +4302,12 @@ static int __init floppy_init(void) if

[PATCH] ecryptfs ecryptfs_read_super path_lookup errh fix

2007-02-19 Thread Dmitriy Monakhov
root -ocipher=aes Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] - diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index 80044d1..812427e 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c @@ -487,7 +487,7 @@ static int ecryptfs_read_super(struct super_block *sb, const char

Re: [PATCH] ecryptfs ecryptfs_read_super path_lookup errh fix

2007-02-19 Thread Dmitriy Monakhov
Dmitriy Monakhov [EMAIL PROTECTED] writes: if path_lookup() return non zero code we don't have to worry about 'nd' parameter, but ecryptfs_read_super does path_release(nd) after path_lookup has failed, and dentry counter becomes negative :) , this result in folowing BUG

[patch] freevxfs: possible null pointer dereference fix

2007-02-19 Thread Dmitriy Monakhov
sb_read may return NULL, so let's explicitly check it. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] - diff --git a/fs/freevxfs/vxfs_bmap.c b/fs/freevxfs/vxfs_bmap.c index 2d71128..f86fd3c 100644 --- a/fs/freevxfs/vxfs_bmap.c +++ b/fs/freevxfs/vxfs_bmap.c @@ -137,7 +137,7

[patch] reiserfs: possible null pointer dereference during resize

2007-02-19 Thread Dmitriy Monakhov
sb_read may return NULL, let's explicitly check it. If so free new bitmap blocks array, after this we may safely exit as it done above during bitmap allocation. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] - diff --git a/fs/reiserfs/resize.c b/fs/reiserfs/resize.c index 3156847

[PATCH] ecryptfs lower_file largefile issue

2007-02-21 Thread Dmitriy Monakhov
to opened lower file flags as it done in unionfs and nfsd. Also remove unnecessery #define from ecryptfs_initialize_file(). Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c index bd969ad..7a7d25d 100644 --- a/fs/ecryptfs/file.c +++ b/fs/ecryptfs

Re: [Ecryptfs-devel] [PATCH] ecryptfs lower_file largefile issue

2007-02-21 Thread Dmitriy Monakhov
Michael Halcrow [EMAIL PROTECTED] writes: On Wed, Feb 21, 2007 at 01:07:22PM +0300, Dmitriy Monakhov wrote: Where is largefile issue in ecryptfs. Thanks for your thorough work on resolving such issues. We will integrate your patches and testcases into the next release as soon as we get

[PATCH] ecryptfs remove unnecessary flush_dcache_page

2007-02-21 Thread Dmitriy Monakhov
Dmitriy Monakhov [EMAIL PROTECTED] writes: 1)Function ecryptfs_do_readpage() calls flush_dcache_page(lower_page), but lower_page was't changed here. So remove this line. 2)prepare_write ret val was ignored in ecryptfs_write_inode_size_to_header(). If error happends we can't call

[PATCH] MPT fusion: handle mpt_resume() failure while resuming

2007-02-23 Thread Dmitriy Monakhov
Since mpt-fusion-handle-pci-layer-error-on-resume.patch function mpt_resume() can return error code. Signed-off-by: Monakhov Dmitriy [EMAIL PROTECTED] --- drivers/message/fusion/mptscsih.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git

[PATCH] libata: handle ata_pci_device_do_resume() failure while resuming

2007-02-23 Thread Dmitriy Monakhov
Since commit:553c4aa630af7bc885e056d0436e4eb7f238579b ata_pci_device_do_resume() can return error code, all callers was updated except this one. Signed-off-by: Monakhov Dmitriy [EMAIL PROTECTED] --- drivers/ata/sata_inic162x.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff

[PATCH] ecryptfs: handles AOP_TRUNCATED_PAGE better

2007-02-23 Thread Dmitriy Monakhov
- In fact we don't have to fail if AOP_TRUNCATED_PAGE was returned from prepare_write or commit_write. It is beter to retry attempt where it is possible. - Rearange ecryptfs_get_lower_page() error handling logic, make it more clean. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] --- fs

[PATCH] 3c59x: Handle pci_enable_device() failure while resuming

2007-02-23 Thread Dmitriy Monakhov
Handle pci_enable_device() failure while resuming, we can safely exit here. Signed-off-by: Monakhov Dmitriy [EMAIL PROTECTED] --- drivers/net/3c59x.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 2b750bd..ea4a78f

[PATCH] sk98lin: handle pci_enable_device() return value in skge_resume()

2007-02-23 Thread Dmitriy Monakhov
This thread looks dead but issue was't fixed. Jiri Kosina [EMAIL PROTECTED] writes: - pci_enable_device(pdev); + ret = pci_enable_device(pdev); + if (ret) { + printk(KERN_ERR sk98lin: Cannot enable PCI device %s during resume\n, + dev-name); +

Re: [PATCH] sk98lin: handle pci_enable_device() return value in skge_resume()

2007-02-24 Thread Dmitriy Monakhov
Dmitriy Monakhov [EMAIL PROTECTED] writes: This thread looks dead but issue was't fixed. Jiri Kosina [EMAIL PROTECTED] writes: - pci_enable_device(pdev); + ret = pci_enable_device(pdev); + if (ret) { + printk(KERN_ERR sk98lin: Cannot enable PCI device %s during resume\n

[PATCH] libata: handle ata_pci_device_do_resume() failure while resuming (v2)

2007-02-25 Thread Dmitriy Monakhov
Randy Dunlap [EMAIL PROTECTED] writes: On Sat, 24 Feb 2007 00:43:18 +0300 Dmitriy Monakhov wrote: Since commit:553c4aa630af7bc885e056d0436e4eb7f238579b ata_pci_device_do_resume() can return error code, all callers was updated except this one. Signed-off-by: Monakhov Dmitriy [EMAIL

Re: [PATCH 2/3] pcmcia: Handle request_irq() failure while opening device

2007-02-26 Thread Dmitriy Monakhov
Monakhov Dmitriy [EMAIL PROTECTED] writes: Signed-off-by: Monakhov Dmitriy [EMAIL PROTECTED] --- drivers/net/pcmcia/axnet_cs.c |8 +++- drivers/net/pcmcia/pcnet_cs.c |8 +++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/net/pcmcia/axnet_cs.c

[PATCH] ecryptfs: lower root result must be adirectory

2007-02-27 Thread Dmitriy Monakhov
patch against lastest mm tree. - Currently after path_lookup succeed we dot't have any guarantie what it is DIR. This must be explicitly demanded. - path_lookup can't return negative dentry, So inode check is useless. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] diff --git a/fs/ecryptfs

[PATCH] sk98lin: handle pci_enable_device() return value in skge_resume() [resend]

2007-02-27 Thread Dmitriy Monakhov
Signed-off-by: Monakhov Dmitriy [EMAIL PROTECTED] --- drivers/net/sk98lin/skge.c | 20 +++- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c index e94ab25..eea753a 100644 --- a/drivers/net/sk98lin/skge.c +++

[PATCH] mm: be sure to trim blocks after direct_io has failed

2007-02-28 Thread Dmitriy Monakhov
This is updated version of patch aimed to fix direct_io error handling issue i've previously sent 2 wheeks ago. If you don't like anything in this patch plese let me know. Changes: - comments added. I think now it is clearly describe things. - patch prepared against 2.6.20-mm2 How this patch

[PATCH] ecryptfs: check xattr operation support fix

2007-02-28 Thread Dmitriy Monakhov
- ecryptfs_write_inode_size_to_metadata() error code was ignored. - i_op-setxattr() must be supported by lower fs because used below. Signed-off-by: Monakhov Dmitriy [EMAIL PROTECTED] --- fs/ecryptfs/inode.c |6 +++--- fs/ecryptfs/mmap.c |3 ++- 2 files changed, 5 insertions(+), 4

[PATCH][RFC] ext3: Handle ext[34]_journal_stop() failure

2007-02-28 Thread Dmitriy Monakhov
Where are many places where _journal_stop() return code wasn't checked. Off cause _journal_stop() failed very rarely (and usually with fatal consequences), but this does'n meen it should not be checked. For example most retry loops looks like follows: ext3_journal_stop(handle);

[PATCH] floppy: handle device_create_file() failure while init

2007-03-02 Thread Dmitriy Monakhov
This patch kills the ignoring return value of 'device_create_file' warning message. Signed-off-by: Monakhov Dmitriy [EMAIL PROTECTED] --- drivers/block/floppy.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index

[patch] kobject: new_device-kref wasn't putted in kobject_move()

2007-03-03 Thread Dmitriy Monakhov
Signed-off-by: Monakhov Dmitriy [EMAIL PROTECTED] diff --git a/lib/kobject.c b/lib/kobject.c index b94f208..b11f7b2 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -432,6 +432,7 @@ int kobject_move(struct kobject *kobj, struct kobject *new_parent) kobject_put(old_parent);

Re: [patch] kobject: new_device-kref wasn't putted in kobject_move()

2007-03-03 Thread Dmitriy Monakhov
Dmitriy Monakhov [EMAIL PROTECTED] writes: Signed-off-by: Monakhov Dmitriy [EMAIL PROTECTED] diff --git a/lib/kobject.c b/lib/kobject.c index b94f208..b11f7b2 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -432,6 +432,7 @@ int kobject_move(struct kobject *kobj, struct kobject

[patch] udf: possible null pointer dereference while load_partition

2007-03-04 Thread Dmitriy Monakhov
sb_read may return NULL, let's explicitly check it. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] diff --git a/fs/udf/super.c b/fs/udf/super.c index f4b3265..951b85d 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -1407,6 +1407,8 @@ udf_load_partition(struct super_block *sb

[PATCH] ext3: dirindex error pointer issues

2007-03-04 Thread Dmitriy Monakhov
- ext3_dx_find_entry() exit with out setting proper error pointer - do_split() exit with out setting proper error pointer it is realy painful because many callers contain folowing code: de = do_split(handle,dir, bh, frame, hinfo, retval); if (!(de))

Re: [PATCH] ext3: dirindex error pointer issues

2007-03-04 Thread Dmitriy Monakhov
Andreas Dilger [EMAIL PROTECTED] writes: On Mar 04, 2007 17:18 +0300, Dmitriy Monakhov wrote: - ext3_dx_find_entry() exit with out setting proper error pointer - do_split() exit with out setting proper error pointer it is realy painful because many callers contain folowing code

Re: linux-2.6.21-rc2 compile warnings

2007-03-05 Thread Dmitriy Monakhov
young dave [EMAIL PROTECTED] writes: Hi, As I compile the linux-2.6.21-rc2 (gcc version 3.4.6), there's some warning messages: you should probably check -mm tree may be some issues already fixed where. drivers/video/Kconfig:1622:warning: 'select' used by config symbol 'FB_PS3' refer to

[PATH][RFC] mm: Move common segments checks to separate function

2007-01-24 Thread Dmitriy Monakhov
Move common segments checks from __generic_file_aio_{read,write}_nolock() to separate helper function generic_segment_checks(). Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] --- diff --git a/mm/filemap.c b/mm/filemap.c index 8332c77..d01abb6 100644 --- a/mm/filemap.c +++ b/mm/filemap.c

[PATCH][RFC] incorrect direct io error handling (v3)

2007-01-24 Thread Dmitriy Monakhov
/dev/VG/test e2fsck 1.39 (29-May-2006) Pass 1: Checking inodes, blocks, and sizes Inode 14, i_size is 0, should be 56556544. Fixy? yes Pass 2: Checking directory structure Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] --- diff --git a/mm/filemap.c b/mm/filemap.c index d01abb6..96840e5

Re: [PATH][RFC] mm: Move common segments checks to separate function

2007-01-24 Thread Dmitriy Monakhov
Dmitriy Monakhov [EMAIL PROTECTED] writes: Move common segments checks from __generic_file_aio_{read,write}_nolock() to separate helper function generic_segment_checks(). WOW my eyes I'm realy sorry but this patch is litle bit broken. :( I've forgot to check generic_segment_checks

Re: [PATCH][RFC] incorrect direct io error handling (v3)

2007-01-26 Thread Dmitriy Monakhov
Andrew Morton [EMAIL PROTECTED] writes: On Wed, 24 Jan 2007 22:05:06 +0300 Dmitriy Monakhov [EMAIL PROTECTED] wrote: incorrect direct io error handling (v3) Changes from v2: - Remove BUG_ON(!mutex_is_locked(..)) for non blkdev. - vmtruncate() called from generic_file_aio_write

[PATCH] :EXT[3,4] jbd layer function called instead of fs specific one

2007-01-28 Thread Dmitriy Monakhov
jbd function called instead of fs specific one. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] -- diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index beaf25f..8a824f4 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c @@ -947,7 +947,7 @@ out: static int ext3_get_block(struct inode *inode

Re: + mm-search_binary_handler-mem-limit-fix.patch added to -mm tree

2007-01-29 Thread Dmitriy Monakhov
The function changes mem limit to USER_DS before possible modprobe, but never restored it again. Truly. The road to hell is paved with good intentions. Martin Schwidefsky [EMAIL PROTECTED] writes: On Mon, 2007-01-29 at 09:37 -0800, Andrew Morton wrote: hm, thanks for testing - I'll drop

[PATCH] Broadcom 4400 resume small fix

2007-01-08 Thread Dmitriy Monakhov
Return value of 'pci_enable_device' was ignored in b44_resume(). We can't ingore it because it can fail. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] --- diff --git a/drivers/net/b44.c b/drivers/net/b44.c index 5eb2ec6..63de31b 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c

pci_driver resume() callback return value

2007-01-08 Thread Dmitriy Monakhov
While investigating pci driver model i've found strange thing. struct pci_driver has resume() callback and it declarated like follows int (*resume) (struct pci_dev *dev);/* Device woken up */ Documentation states about it: from Documentation/pci-error-recovery.txt STEP 5: Resume Operations

[PATCH 0/5] fixing errors handling during pci_driver resume stage

2007-01-09 Thread Dmitriy Monakhov
Where are several places where errors ignored during pci_driver resume stage. In most most cases return value of 'pci_enable_device()' was ignored. drivers from such subsystems affected: - ata - fusion - ide - mmc - net - parisc - parport - pci - serial - To unsubscribe from this list:

[PATCH 1/5] fixing errors handling during pci_driver resume stage [net]

2007-01-09 Thread Dmitriy Monakhov
network pci drivers have to return correct error code during resume stage in case of errors. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] - diff --git a/Makefile b/Makefile diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 80bdcf8..ed06e48 100644 --- a/drivers/net/3c59x.c +++ b

[PATCH 2/5] fixing errors handling during pci_driver resume stage [ata]

2007-01-09 Thread Dmitriy Monakhov
ata pci drivers have to return correct error code during resume stage in case of errors. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] - diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index b517d24..0656334 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1372,7 +1372,9

[PATCH 3/5] fixing errors handling during pci_driver resume stage [fusion]

2007-01-09 Thread Dmitriy Monakhov
fusion pci drivers have to return correct error code during resume stage in case of errors. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] - diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 6e068cf..51a3621 100644 --- a/drivers/message/fusion/mptbase.c

[PATCH 4/5] fixing errors handling during pci_driver resume stage [misc]

2007-01-09 Thread Dmitriy Monakhov
pci drivers have to return correct error code during resume stage in case of errors. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] - diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c index ff80937..a426905 100644 --- a/drivers/ide/pci/sc1200.c +++ b/drivers/ide/pci/sc1200.c

[PATCH 5/5] fixing errors handling during pci_driver resume stage [serial]

2007-01-09 Thread Dmitriy Monakhov
serial pci drivers have to return correct error code during resume stage in case of errors. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] - diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c index 78c0a26..1e14906 100644 --- a/drivers/parport/parport_serial.c

Re: [PATCH 5/5] fixing errors handling during pci_driver resume stage [serial]

2007-01-09 Thread Dmitriy Monakhov
Russell King [EMAIL PROTECTED] writes: On Tue, Jan 09, 2007 at 12:01:58PM +0300, Dmitriy Monakhov wrote: serial pci drivers have to return correct error code during resume stage in case of errors. Sigh. *hate* *hate* *hate*. diff --git a/drivers/serial/8250_pci.c b/drivers/serial

Re: [PATCH] incorrect direct io error handling

2007-01-10 Thread Dmitriy Monakhov
Sorry for long delay (russian holidays are very hard time :) ) David Chinner [EMAIL PROTECTED] writes: On Tue, Dec 19, 2006 at 09:07:12AM +0300, Dmitriy Monakhov wrote: David Chinner [EMAIL PROTECTED] writes: On Mon, Dec 18, 2006 at 04:22:44PM +0300, Dmitriy Monakhov wrote: diff --git a/mm

[PATCH] incorrect direct io error handling

2006-12-18 Thread Dmitriy Monakhov
: Checking inodes, blocks, and sizes Inode 14, i_size is 0, should be 2048. Fix? no Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] - diff --git a/mm/filemap.c b/mm/filemap.c index 8332c77..7c571dd 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2044,8 +2044,9

Re: [PATCH] incorrect direct io error handling

2006-12-18 Thread Dmitriy Monakhov
David Chinner [EMAIL PROTECTED] writes: On Mon, Dec 18, 2006 at 04:22:44PM +0300, Dmitriy Monakhov wrote: diff --git a/mm/filemap.c b/mm/filemap.c index 8332c77..7c571dd 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2044,8 +2044,9 @@ generic_file_direct_write(struct kiocb

Re: [PATCH] incorrect direct io error handling

2006-12-18 Thread Dmitriy Monakhov
Chen, Kenneth W [EMAIL PROTECTED] writes: Dmitriy Monakhov wrote on Monday, December 18, 2006 5:23 AM This patch is result of discussion started week ago here: http://lkml.org/lkml/2006/12/11/66 changes from original patch: - Update wrong comments about i_mutex locking. - Add BUG_ON

[PATCH] Broadcom 4400 resume small fix (v2)

2007-01-10 Thread Dmitriy Monakhov
Changes from v1: - Fix according to Francois Romieu comments. LOG: Some issues in b44_resume(). - Return value of pci_enable_device() was ignored. - If request_irq() has failed we have to just disable device and exit. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] --- diff --git a/drivers

Re: [PATCH 1/5] fixing errors handling during pci_driver resume stage [net]

2007-01-10 Thread Dmitriy Monakhov
Stephen Hemminger [EMAIL PROTECTED] writes: On Tue, 09 Jan 2007 12:01:14 +0300 Dmitriy Monakhov [EMAIL PROTECTED] wrote: network pci drivers have to return correct error code during resume stage in case of errors. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] - Please don't

Re: [PATCH] [RFC] remove ext3 inode from orphan list when link and unlink race

2007-01-14 Thread Dmitriy Monakhov
Eric Sandeen [EMAIL PROTECTED] writes: I've been looking at a case where many threads are opening, unlinking, and hardlinking files on ext3 . How many concurent threads do you use and how long does it takes to trigger this race? I've tried to reproduce this with two threads, but not succeed.

Re: [patch 6/10] mm: be sure to trim blocks

2007-01-14 Thread Dmitriy Monakhov
Nick Piggin [EMAIL PROTECTED] writes: If prepare_write fails with AOP_TRUNCATED_PAGE, or if commit_write fails, then we may have failed the write operation despite prepare_write having instantiated blocks past i_size. Fix this, and consolidate the trimming into one place. Signed-off-by:

[RFC][PATCH] mm: search_binary_handler mem limit fix

2007-01-20 Thread Dmitriy Monakhov
-off-by: Dmitriy Monakhov [EMAIL PROTECTED] diff --git a/fs/exec.c b/fs/exec.c index 11fe93f..c7e017b 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1020,6 +1020,7 @@ int search_binary_handler(struct linux_b { int try,retval; struct linux_binfmt *fmt; + mm_segment_t oldfs

[PATCH] incorrect error handling inside generic_file_direct_write

2006-12-11 Thread Dmitriy Monakhov
than biggest block idx Device: 700h/1792d Inode: 14 Links: 1 Access: (0644/-rw-r--r--) Uid: (0/root) Gid: (0/root) fsck.ext2 -f -n mnt1/fs_img Pass 1: Checking inodes, blocks, and sizes Inode 14, i_size is 0, should be 2048. Fix? no Signed-off-by: Dmitriy

Re: [PATCH] incorrect error handling inside generic_file_direct_write

2006-12-11 Thread Dmitriy Monakhov
Andrew Morton [EMAIL PROTECTED] writes: On Mon, 11 Dec 2006 16:34:27 +0300 Dmitriy Monakhov [EMAIL PROTECTED] wrote: OpenVZ team has discovered error inside generic_file_direct_write() If generic_file_direct_IO() has fail (ENOSPC condition) it may have instantiated a few blocks outside

Re: [PATCH] incorrect error handling inside generic_file_direct_write

2006-12-12 Thread Dmitriy Monakhov
Andrew Morton [EMAIL PROTECTED] writes: On Mon, 11 Dec 2006 16:34:27 +0300 Dmitriy Monakhov [EMAIL PROTECTED] wrote: OpenVZ team has discovered error inside generic_file_direct_write() If generic_file_direct_IO() has fail (ENOSPC condition) it may have instantiated a few blocks outside

Re: [PATCH] incorrect error handling inside generic_file_direct_write

2006-12-12 Thread Dmitriy Monakhov
Andrew Morton [EMAIL PROTECTED] writes: On Tue, 12 Dec 2006 15:20:52 +0300 Dmitriy Monakhov [EMAIL PROTECTED] wrote: XFS (at least) can call generic_file_direct_write() with i_mutex not held. And vmtruncate() expects i_mutex to be held. I guess a suitable solution would be to push

Re: [PATCH] incorrect error handling inside generic_file_direct_write

2006-12-12 Thread Dmitriy Monakhov
Andrew Morton [EMAIL PROTECTED] writes: On Tue, 12 Dec 2006 16:18:32 +0300 Dmitriy Monakhov [EMAIL PROTECTED] wrote: but according to filemaps locking rules: mm/filemap.c:77 .. * -i_mutex (generic_file_buffered_write) *-mmap_sem

[PATCH 0/1][RFC] mm: prepare_write positive return value

2007-02-06 Thread Dmitriy Monakhov
more correct, and its works well. I think not everybody will happy about this, but let's discuss all advantages and disadvantages of this change. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] - diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 62632f5..b4f6eac 100644

[PATCH 1/1][RFC] mm: prepare_write positive return value

2007-02-06 Thread Dmitriy Monakhov
. possible data corruption caused commiting non uptodate bh. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] - diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index dba6dd2..4c5e9f7 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c @@ -1154,6 +1154,18 @@ static int

[PATCH] ecryptfs lower file handling code issues

2007-02-07 Thread Dmitriy Monakhov
eCryptfs lower file handling code has several issues: - Retval from prepare_write()/commit_writ() was't checked to equality to AOP_TRUNCATED_PAGE. - In some places page was't unmapped and unlocked after error. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] -- diff --git

nobh_truncate_page question

2007-02-07 Thread Dmitriy Monakhov
Could some one please explain me what's happens with nobh_truncate_page? int nobh_truncate_page(struct address_space *mapping, loff_t from) { if ((offset (blocksize - 1)) == 0) goto out; ret = -ENOMEM; page = grab_cache_page(mapping, index); if

Re: [patch 3/3] ext2: use perform_write aop

2007-02-08 Thread Dmitriy Monakhov
Nick Piggin [EMAIL PROTECTED] writes: Convert ext2 to use -perform_write. This uses the main loop out of generic_perform_write, but when encountering a short usercopy, it zeroes out new uninitialised blocks, and passes in a short-length commit to __block_commit_write, which does the right

Re: + fs-introduce-write_begin-write_end-and-perform_write-aops.patch added to -mm tree

2007-06-13 Thread Dmitriy Monakhov
On 14:19 Втр 29 Май , [EMAIL PROTECTED] wrote: The patch titled fs: introduce write_begin, write_end, and perform_write aops has been added to the -mm tree. Its filename is fs-introduce-write_begin-write_end-and-perform_write-aops.patch *** Remember to use

[patch] new aop loop fix

2007-06-13 Thread Dmitriy Monakhov
loop.c code itself is not perfect. In fact before Nick's patch partial write was't possible. Assumption what write chunks are always page aligned is realy weird ( see index++ line). Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] diff --git a/drivers/block/loop.c b

[patch] new aop block_write_begin fix

2007-06-13 Thread Dmitriy Monakhov
code: ret = block_write_begin(..., pagep,...) if (ret *pagep != NULL) { unlock_page(*pagep); page_cache_release(*pagep); } Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] diff --git a/fs/buffer.c b

iov_iter_fault_in_readable fix

2007-06-13 Thread Dmitriy Monakhov
-by: Dmitriy Monakhov [EMAIL PROTECTED] diff --git a/include/linux/fs.h b/include/linux/fs.h index fef19fc..7e025ea 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -433,7 +433,7 @@ size_t iov_iter_copy_from_user_atomic(struct page *page, size_t iov_iter_copy_from_user(struct page *page

Re: [patch] new aop loop fix

2007-06-13 Thread Dmitriy Monakhov
On 14:36 Срд 13 Июн , Hugh Dickins wrote: On Wed, 13 Jun 2007, Dmitriy Monakhov wrote: loop.c code itself is not perfect. In fact before Nick's patch partial write was't possible. Assumption what write chunks are always page aligned is realy weird ( see index++ line

Re: + fs-introduce-write_begin-write_end-and-perform_write-aops.patch added to -mm tree

2007-06-13 Thread Dmitriy Monakhov
On 13:43 Срд 13 Июн , Nick Piggin wrote: On Wed, Jun 13, 2007 at 05:40:05PM +0400, Dmitriy Monakhov wrote: On 14:19 ?? 29 ?? , [EMAIL PROTECTED] wrote: The patch titled fs: introduce write_begin, write_end, and perform_write aops has been added to the -mm tree

[PATCH] ext4:fix unexpected error from ext4_reserve_global

2007-06-14 Thread Dmitriy Monakhov
function ext4_reserve_local() returns -ENOSPC Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] --- fs/ext4/balloc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 4d7bfd2..43ae8f8 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c

[PATCH] deny partial write for loop dev fd

2007-06-16 Thread Dmitriy Monakhov
Nick's write_begin/write_end patch set, and let's it behave the same way after. Signed-off-by: Dmitriy Monakhov [EMAIL PROTECTED] --- drivers/block/loop.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 4bab9b1..de122f3

Re: iov_iter_fault_in_readable fix

2007-06-16 Thread Dmitriy Monakhov
On 18:31 Чтв 14 Июн , Christoph Hellwig wrote: On Wed, Jun 13, 2007 at 05:57:59PM +0400, Dmitriy Monakhov wrote: Function prerform check for signgle region, with out respect to segment nature of iovec, For example writev no longer works :) Btw, could someone please start

Re: [PATCH] incorrect direct io error handling

2006-12-18 Thread Dmitriy Monakhov
David Chinner <[EMAIL PROTECTED]> writes: > On Mon, Dec 18, 2006 at 04:22:44PM +0300, Dmitriy Monakhov wrote: >> diff --git a/mm/filemap.c b/mm/filemap.c >> index 8332c77..7c571dd 100644 >> --- a/mm/filemap.c >> +++ b/mm/filemap.c >> @@ -2044,8 +2044,9 @@

Re: [PATCH] incorrect direct io error handling

2006-12-18 Thread Dmitriy Monakhov
"Chen, Kenneth W" <[EMAIL PROTECTED]> writes: > Dmitriy Monakhov wrote on Monday, December 18, 2006 5:23 AM >> This patch is result of discussion started week ago here: >> http://lkml.org/lkml/2006/12/11/66 >> changes from original patch: >> -

[PATCH] Broadcom 4400 resume small fix

2007-01-08 Thread Dmitriy Monakhov
Return value of 'pci_enable_device' was ignored in b44_resume(). We can't ingore it because it can fail. Signed-off-by: Dmitriy Monakhov <[EMAIL PROTECTED]> --- diff --git a/drivers/net/b44.c b/drivers/net/b44.c index 5eb2ec6..63de31b 100644 --- a/drivers/net/b44.c +++ b/drivers/net

  1   2   >