- 10 Mar, 2005 40 commits
-
-
Hirofumi Ogawa authored
Fix a missing error check for sync_buffer_dirty(). Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
Instead of mark_inode_dirty(inode); if (IS_SYNC(inode)) fat_sync_inode(inode); use this if (IS_SYNC(inode)) fat_sync_inode(inode); else mark_inode_dirty(inode); And if occurs a error, restore the ->i_start and ->i_logstart. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>- Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
Some mark_inode_dirty() is unneeded. Those are already detached (it's not written) or change a ->i_nlink count only (fatfs don't have). Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
Since MSDOS_SB() is inline function, it increases text size at each calls. I don't know whether there is __attribute__ for avoiding this. This removes the multiple call. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
The "i_pos" can calculate later, so this makes the "i_pos" when it's needed. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
In order not to write out the same block repeatedly, rewrite the fat_add_entries(). Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
With this change, ->mkdir() uses the correct updating order. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
The msdos_add_entry() use similar interface to vfat_add_entry(). And use a same timestamp on some operations path. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
Cleans up the msdos_rename(). (use the logic similar to vfat_rename().) Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
With this, the vfat_build_slots() builds the completely data including the timestamp and cluster. (But this is not using "cluster", it's not complete yet) Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
The msdos_find() provide the "struct fat_slot_info". Then some cleanups. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
Use "struct fat_slot_info" for fat_scan(). But ".." entry can not provide valid informations for inode, so add the fat_get_dotdot_entry() as special case. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
Just use ERR_PTR() instead of getting the error code by additional argument. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
This changes the fat_slot_info->nr_slot, now it's total counts which include a shortname entry. And this adds a fat_remove_entries() which use the ->nr_slots. In order not to write out the same block repeatedly, fat_remove_entries() was rewritten from vfat_remove_entries(). Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
The fat_search_long() provide the "struct fat_slot_info" by this change. So, vfat_find() became to be enough simple, and it just returns 0 or error. And the error check of vfat_find() is also simplify. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
Add "struct fat_slot_info" for updating data of the directory entries. 1) Rename "struct vfat_slot_info" to "struct fat_slot_info" 2) Add "de" and "bh" to fat_slot_info instead of using argument. 3) Replace the "vfat_slot_info + de + bh" by new fat_slot_info Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
This changes ->free_clusters and ->prev_free from "int" to "unsigned int". These value should be never negative value (but it's using 0xffffffff(-1) as undefined state). With this changes, fatfs would handle the corruption of free_clusters more proper. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
In order not to write the same block repeatedly, rewrite the FAT entry access stuff. And this separates the "allocate the cluster" and "link to cluster chain" operations for expanding the file/dir safely. (fat_alloc_clusters() allocates the cluster, and fat_chain_add() links allocated cluster to the chain which inode has.) Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
Adds MS_SYNCHRONOUS flag support. Signed-off-by: Colin Leroy <colin@colino.net> Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
In the case of dotsOK, re-initialization of "ptname" pointer is needed, otherwise, "ptname" is pointing the previous start position. This fixes it. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
This updates the FAT attributes as well as (hopefully) corrects the handling of VFAT ctime. The FAT attributes are implemented as a 32-bit ioctl, per the previous discussions. Signed-Off-By: H. Peter Anvin <hpa@zytor.com> Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hirofumi Ogawa authored
With Christoph Hellwig <hch@lst.de> These patches adds the `-o sync' and `-o dirsync' supports to fatfs. If user specified that option, the fatfs does traditional ordered updates by using synchronous writes. If compared to before, these patches will show a improvement of robustness I think. `-o sync' - writes all buffers out before returning from syscall. `-o dirsync' - writes the directory's metadata, and unreferencing operations of data block. remaining to be done fat_generic_ioctl(), fat_notify_change(), ATTR_ARCH of fat_xxx_write[v], and probably, filling hole in cont_prepare_write(), NOTE: Since fatfs doesn't have link-count, unfortunately ->rename() is not safe order at all. It may make the shared blocks, but user shouldn't lose the data by ->rename(). If you test this, please use the dosfstools at http://www.zip.com.au/~akpm/linux/patches/stuff/fatfsprogs.tar.bz2 This is fixing several bugs of dosfstools. And "2/29" patch from hpa adds new ioctl, the attached archive is also including the commands for testing it. This patch fixes vectored write support on fat to do the nessecary non-standard action done in write() aswell. Also adds aio support and makes read/write wrappers around the aio version. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
J. Bruce Fields authored
Removing the spurious (!clnt) check, as in the following, will also simplify that conflict resolution a bit. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
gam3@gam3.net authored
ETXTBSY doesn't have a direct anaolog in NFS, so just map it to nfserr_io. As this is the default error code this does not change the operation of nfsd. It only reduces logging. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
Use msleep() instead of schedule_timeout() to guarantee the task delays as expected. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
Get rid of remove_lease, use setlease() with F_UNLCK Signed-off-by: Andy Adamson <andros@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
Remove nfs4_check_deleg_recall(). Move its checks into __setlease() via two new lock_manager callbacks, fl_mylease and fl_change, so that all leases (not just NFSv4 lease as with nfs4_check_deleg_recall) are checked. Default implementations of fl_mylease and fl_change are provided for the sake of the fcntl_setlease interface. Both callbacks must always be defined. fl_mylease: for the NFSv4 server, this check is used to see if an existing lease comes from the same client. For the fcntl_setlease interface, the existing logic is preserved. the fl_mylease check sees if the existing lease is from the input filp. fl_change: called if the fl_mylease returns true the NFSv4 server does not hand out a delegation to a client that already has one. -EAGAIN is returned. Otherwise lease_modify is used. For the fcntl_setlease interface, the exisiting logic is preserved: The callback used in lease_modify(). Signed-off-by: Andy Adamson <andros@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
We get a NULL dereference here anyway, no need to BUG() explicitly. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
Note that the second parameter is unused. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
It is the responsibility of the code that runs in the do_recall thread to drop the reference to the delegation. So if we fail to run that thread, then we need to do it ourselves here. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
The dl_state flag isn't actually useful. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
Allow io using a delegation stateid to proceed without the need to reopen the file, as is done already with open stateid's. Signed-off-by: Andy Adamson <andros@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
We shouldn't be calling release_deleg under a spinlock. Signed-off-by: Andy Adamson <andros@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
The st_vfs_file pointer is set when the open that originally got the delegation is closed, and then in release_deleg we attempt to distinguish between the case when the original open has been closed and when it hasn't. The resulting logic is complicated and buggy. It's much simpler just to keep a reference count on the struct file. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
The only reason we're keeping a pointer to the stateid in the delegation is so we can get at st_vfs_file. So we should just keep a pointer to the struct file instead. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Neil Brown authored
Just separate part of release_deleg into a separate function. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-