diff options
author | Feng Tian <feng.tian@intel.com> | 2011-11-22 03:01:14 +0000 |
---|---|---|
committer | Jordan Justen <jordan.l.justen@intel.com> | 2016-04-06 23:22:43 -0700 |
commit | 1d951a3086ab569073ee60e890a1cddf512d122c (patch) | |
tree | 1585e9ab1a8399bb38a6e7a62bf7da685b380a2a /FatPkg/FatPei/FatLiteAccess.c | |
parent | 4d0e0c4510719cea131701edb667160d75f3bff9 (diff) | |
download | edk2-platforms-1d951a3086ab569073ee60e890a1cddf512d122c.tar.xz |
Only traverse recovery file's FAT table to fast the recovery performance.
Signed-off-by: erictian
Reviewed-by: niruiyu
(based on FatPkg commit 6e68a62cf0c6b8ecad2bceff4e8d86ff08d1f041)
[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'FatPkg/FatPei/FatLiteAccess.c')
-rw-r--r-- | FatPkg/FatPei/FatLiteAccess.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/FatPkg/FatPei/FatLiteAccess.c b/FatPkg/FatPei/FatLiteAccess.c index 0a688a3185..53f5e3f60c 100644 --- a/FatPkg/FatPei/FatLiteAccess.c +++ b/FatPkg/FatPei/FatLiteAccess.c @@ -1,7 +1,7 @@ /** @file
FAT file system access routines for FAT recovery PEIM
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
@@ -315,7 +315,10 @@ FatSetFilePos ( }
File->CurrentPos += Pos;
-
+ //
+ // Calculate the amount of consecutive cluster occupied by the file.
+ // FatReadFile() will use it to read these blocks once.
+ //
File->StraightReadAmount = 0;
Cluster = File->CurrentCluster;
while (!FAT_CLUSTER_FUNCTIONAL (Cluster)) {
@@ -517,9 +520,6 @@ FatReadNextDirectoryEntry ( SubFile->StartingCluster = SubFile->CurrentCluster;
SubFile->Volume = ParentDir->Volume;
- if (SubFile->StartingCluster != 0) {
- Status = FatSetFilePos (PrivateData, SubFile, 0);
- }
//
// in Pei phase, time parameters do not need to be filled for minimum use.
//
|