Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
1af2511d
Commit
1af2511d
authored
Feb 12, 2004
by
Dave Kleikamp
Browse files
Options
Browse Files
Download
Plain Diff
Merge jfs@jfs.bkbits.net:linux-2.5
into austin.ibm.com:/shaggy/bk/jfs-2.5
parents
9eb08f79
20b02dda
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
55 deletions
+50
-55
Documentation/filesystems/jfs.txt
Documentation/filesystems/jfs.txt
+3
-16
fs/jfs/jfs_unicode.c
fs/jfs/jfs_unicode.c
+34
-20
fs/jfs/jfs_unicode.h
fs/jfs/jfs_unicode.h
+1
-2
fs/jfs/namei.c
fs/jfs/namei.c
+10
-13
fs/jfs/super.c
fs/jfs/super.c
+2
-4
No files found.
Documentation/filesystems/jfs.txt
View file @
1af2511d
...
...
@@ -12,10 +12,9 @@ Barry Arndt barndt@us.ibm.com
The following mount options are supported:
iocharset=name Character set to use for converting from Unicode to
ASCII. The default is compiled into the kernel as
CONFIG_NLS_DEFAULT. Use iocharset=utf8 for UTF8
translations. This requires CONFIG_NLS_UTF8 to be set
in the kernel .config file.
ASCII. The default is to do no conversion. Use
iocharset=utf8 for UTF8 translations. This requires
CONFIG_NLS_UTF8 to be set in the kernel .config file.
resize=value Resize the volume to <value> blocks. JFS only supports
growing a volume, not shrinking it. This option is only
...
...
@@ -36,18 +35,6 @@ errors=continue Keep going on a filesystem error.
errors=remount-ro Default. Remount the filesystem read-only on an error.
errors=panic Panic and halt the machine if an error occurs.
JFS TODO list:
Plans for our near term development items
- enhance support for logfile on dedicated partition
Longer term work items
- implement defrag utility, for online defragmenting
- add quota support
- add support for block sizes (512,1024,2048)
Please send bugs, comments, cards and letters to shaggy@austin.ibm.com.
The JFS mailing list can be subscribed to by using the link labeled
...
...
fs/jfs/jfs_unicode.c
View file @
1af2511d
/*
* Copyright (
c) International Business Machines Corp., 2000-2002
* Copyright (
C) International Business Machines Corp., 2000-2004
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -18,7 +18,7 @@
#include <linux/fs.h>
#include <linux/slab.h>
#include "jfs_
types
.h"
#include "jfs_
incore
.h"
#include "jfs_filsys.h"
#include "jfs_unicode.h"
#include "jfs_debug.h"
...
...
@@ -35,16 +35,22 @@ int jfs_strfromUCS_le(char *to, const wchar_t * from, /* LITTLE ENDIAN */
int
i
;
int
outlen
=
0
;
if
(
codepage
)
{
for
(
i
=
0
;
(
i
<
len
)
&&
from
[
i
];
i
++
)
{
int
charlen
;
charlen
=
codepage
->
uni2char
(
le16_to_cpu
(
from
[
i
]),
&
to
[
outlen
],
codepage
->
uni2char
(
le16_to_cpu
(
from
[
i
]),
&
to
[
outlen
],
NLS_MAX_CHARSET_SIZE
);
if
(
charlen
>
0
)
{
if
(
charlen
>
0
)
outlen
+=
charlen
;
}
else
{
else
to
[
outlen
++
]
=
'?'
;
}
}
else
{
for
(
i
=
0
;
(
i
<
len
)
&&
from
[
i
];
i
++
)
to
[
i
]
=
(
char
)
(
le16_to_cpu
(
from
[
i
]));
outlen
=
i
;
}
to
[
outlen
]
=
0
;
return
outlen
;
...
...
@@ -62,15 +68,23 @@ int jfs_strtoUCS(wchar_t * to,
int
charlen
;
int
i
;
for
(
i
=
0
;
len
&&
*
from
;
i
++
,
from
+=
charlen
,
len
-=
charlen
)
{
if
(
codepage
)
{
for
(
i
=
0
;
len
&&
*
from
;
i
++
,
from
+=
charlen
,
len
-=
charlen
)
{
charlen
=
codepage
->
char2uni
(
from
,
len
,
&
to
[
i
]);
if
(
charlen
<
1
)
{
jfs_err
(
"jfs_strtoUCS: char2uni returned %d."
,
charlen
);
jfs_err
(
"jfs_strtoUCS: char2uni returned %d."
,
charlen
);
jfs_err
(
"charset = %s, char = 0x%x"
,
codepage
->
charset
,
(
unsigned
char
)
*
from
);
codepage
->
charset
,
(
unsigned
char
)
*
from
);
return
charlen
;
}
}
}
else
{
for
(
i
=
0
;
(
i
<
len
)
&&
from
[
i
];
i
++
)
to
[
i
]
=
(
wchar_t
)
from
[
i
];
}
to
[
i
]
=
0
;
return
i
;
...
...
@@ -82,9 +96,9 @@ int jfs_strtoUCS(wchar_t * to,
* FUNCTION: Allocate and translate to unicode string
*
*/
int
get_UCSname
(
struct
component_name
*
uniName
,
struct
dentry
*
dentry
,
struct
nls_table
*
nls_tab
)
int
get_UCSname
(
struct
component_name
*
uniName
,
struct
dentry
*
dentry
)
{
struct
nls_table
*
nls_tab
=
JFS_SBI
(
dentry
->
d_sb
)
->
nls_tab
;
int
length
=
dentry
->
d_name
.
len
;
if
(
length
>
JFS_NAME_MAX
)
...
...
fs/jfs/jfs_unicode.h
View file @
1af2511d
...
...
@@ -30,8 +30,7 @@ typedef struct {
extern
signed
char
UniUpperTable
[
512
];
extern
UNICASERANGE
UniUpperRange
[];
extern
int
get_UCSname
(
struct
component_name
*
,
struct
dentry
*
,
struct
nls_table
*
);
extern
int
get_UCSname
(
struct
component_name
*
,
struct
dentry
*
);
extern
int
jfs_strfromUCS_le
(
char
*
,
const
wchar_t
*
,
int
,
struct
nls_table
*
);
#define free_UCSname(COMP) kfree((COMP)->name)
...
...
fs/jfs/namei.c
View file @
1af2511d
...
...
@@ -78,7 +78,7 @@ int jfs_create(struct inode *dip, struct dentry *dentry, int mode,
* search parent directory for entry/freespace
* (dtSearch() returns parent directory page pinned)
*/
if
((
rc
=
get_UCSname
(
&
dname
,
dentry
,
JFS_SBI
(
dip
->
i_sb
)
->
nls_tab
)))
if
((
rc
=
get_UCSname
(
&
dname
,
dentry
)))
goto
out1
;
/*
...
...
@@ -204,7 +204,7 @@ int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode)
* search parent directory for entry/freespace
* (dtSearch() returns parent directory page pinned)
*/
if
((
rc
=
get_UCSname
(
&
dname
,
dentry
,
JFS_SBI
(
dip
->
i_sb
)
->
nls_tab
)))
if
((
rc
=
get_UCSname
(
&
dname
,
dentry
)))
goto
out1
;
/*
...
...
@@ -332,7 +332,7 @@ int jfs_rmdir(struct inode *dip, struct dentry *dentry)
goto
out
;
}
if
((
rc
=
get_UCSname
(
&
dname
,
dentry
,
JFS_SBI
(
dip
->
i_sb
)
->
nls_tab
)))
{
if
((
rc
=
get_UCSname
(
&
dname
,
dentry
)))
{
goto
out
;
}
...
...
@@ -451,7 +451,7 @@ int jfs_unlink(struct inode *dip, struct dentry *dentry)
jfs_info
(
"jfs_unlink: dip:0x%p name:%s"
,
dip
,
dentry
->
d_name
.
name
);
if
((
rc
=
get_UCSname
(
&
dname
,
dentry
,
JFS_SBI
(
dip
->
i_sb
)
->
nls_tab
)))
if
((
rc
=
get_UCSname
(
&
dname
,
dentry
)))
goto
out
;
IWRITE_LOCK
(
ip
);
...
...
@@ -786,7 +786,7 @@ int jfs_link(struct dentry *old_dentry,
/*
* scan parent directory for entry/freespace
*/
if
((
rc
=
get_UCSname
(
&
dname
,
dentry
,
JFS_SBI
(
ip
->
i_sb
)
->
nls_tab
)))
if
((
rc
=
get_UCSname
(
&
dname
,
dentry
)))
goto
out
;
if
((
rc
=
dtSearch
(
dir
,
&
dname
,
&
ino
,
&
btstack
,
JFS_CREATE
)))
...
...
@@ -866,7 +866,7 @@ int jfs_symlink(struct inode *dip, struct dentry *dentry, const char *name)
* (dtSearch() returns parent directory page pinned)
*/
if
((
rc
=
get_UCSname
(
&
dname
,
dentry
,
JFS_SBI
(
dip
->
i_sb
)
->
nls_tab
)))
if
((
rc
=
get_UCSname
(
&
dname
,
dentry
)))
goto
out1
;
/*
...
...
@@ -1069,12 +1069,10 @@ int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
old_ip
=
old_dentry
->
d_inode
;
new_ip
=
new_dentry
->
d_inode
;
if
((
rc
=
get_UCSname
(
&
old_dname
,
old_dentry
,
JFS_SBI
(
old_dir
->
i_sb
)
->
nls_tab
)))
if
((
rc
=
get_UCSname
(
&
old_dname
,
old_dentry
)))
goto
out1
;
if
((
rc
=
get_UCSname
(
&
new_dname
,
new_dentry
,
JFS_SBI
(
old_dir
->
i_sb
)
->
nls_tab
)))
if
((
rc
=
get_UCSname
(
&
new_dname
,
new_dentry
)))
goto
out2
;
/*
...
...
@@ -1329,7 +1327,7 @@ int jfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev)
jfs_info
(
"jfs_mknod: %s"
,
dentry
->
d_name
.
name
);
if
((
rc
=
get_UCSname
(
&
dname
,
dentry
,
JFS_SBI
(
dir
->
i_sb
)
->
nls_tab
)))
if
((
rc
=
get_UCSname
(
&
dname
,
dentry
)))
goto
out
;
ip
=
ialloc
(
dir
,
mode
);
...
...
@@ -1411,8 +1409,7 @@ static struct dentry *jfs_lookup(struct inode *dip, struct dentry *dentry, struc
else
if
(
strcmp
(
name
,
".."
)
==
0
)
inum
=
PARENT
(
dip
);
else
{
if
((
rc
=
get_UCSname
(
&
key
,
dentry
,
JFS_SBI
(
dip
->
i_sb
)
->
nls_tab
)))
if
((
rc
=
get_UCSname
(
&
key
,
dentry
)))
return
ERR_PTR
(
rc
);
rc
=
dtSearch
(
dip
,
&
key
,
&
inum
,
&
btstack
,
JFS_LOOKUP
);
free_UCSname
(
&
key
);
...
...
fs/jfs/super.c
View file @
1af2511d
...
...
@@ -195,6 +195,7 @@ static void jfs_put_super(struct super_block *sb)
rc
=
jfs_umount
(
sb
);
if
(
rc
)
jfs_err
(
"jfs_umount failed with return code %d"
,
rc
);
if
(
sbi
->
nls_tab
)
unload_nls
(
sbi
->
nls_tab
);
sbi
->
nls_tab
=
NULL
;
...
...
@@ -435,9 +436,6 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent)
if
(
!
sb
->
s_root
)
goto
out_no_root
;
if
(
!
sbi
->
nls_tab
)
sbi
->
nls_tab
=
load_nls_default
();
/* logical blocks are represented by 40 bits in pxd_t, etc. */
sb
->
s_maxbytes
=
((
u64
)
sb
->
s_blocksize
)
<<
40
;
#if BITS_PER_LONG == 32
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment